TCM Security Academy Notes - by syselement
🏠 Home BlogGitHub📚 Buy Me a Book
  • TCM Security Academy Notes
  • Courses
    • TCM - Linux 101
      • 1. Introduction
        • Linux Distributions
        • Installing Linux
      • 2. Command Line
        • Intro to Command Line
        • Getting help on the Command Line
        • Command Line Arguments and Options
        • Reading Text Files
      • 3. File System
        • Filesystem Hierarchy Standard
        • Devices, Partitions and Mounting
        • Absolute and Relative Paths
        • Files and Directories
        • Paths, Filenames and Text Files
        • Filesystem Links
        • Archiving and Searching Files
      • 4. Users and Groups
        • Working with Users and Groups
        • File and Directory Permissions
        • Changing Users and Passwords
      • 5. Installing Software
        • Package Management
      • 6. Shells
        • Common Command Line Shells
        • Environment Variables & Startup Files
        • Input/Output Redirection
        • Command History & Substitution
      • 7. Utilities and File Editors
        • Searching and Processing Text
        • Networking at the Command Line
        • File Transfer
        • Text Editors and Converters
      • 8. Process Management
        • Process Information
        • Foreground and Background Processes
        • Managing Processes
        • Scheduling Processes
      • 9. Regular Expressions
        • Regular Expressions, Searching, Replacing, Building
      • 10. Bash Scripting
        • Bash Scripting Basics, Control Structures, Loops
      • 🌐Linux101 References
    • TCM - Mobile Application Penetration Testing
      • 1. Introduction & Mobile Pentesting
      • 2. Android Security
      • 3. Android Lab Setup
      • 4. Android Static Analysis
      • 5. Android Dynamic Analysis
      • 6. Android Bug Bounty
      • 7. iOS Security
      • 8. iOS Lab Setup
      • 9. iOS Static Analysis
      • 10. iOS Dynamic Analysis
      • 11. iOS Bug Bounty
      • 🌐MAPT References
    • TCM - Practical Ethical Hacking
      • 1. Introduction & Networking
      • 2. Lab Set Up, Linux & Python
        • Intro to Kali Linux
        • Intro to Python
      • 3. The Ethical Hacker Methodology
        • Information Gathering
        • Scanning & Enumeration
        • Vulnerability Scanning with Nessus
        • Exploitation Basics
        • Capstone Practical Labs
      • 4. Active Directory
        • Active Directory Lab
        • AD - Initial Attack Vectors
        • AD - Post-Compromise Enumeration
        • AD - Post-Compromise Attacks
        • AD - Additional Attacks
        • AD - Case Studies
      • 5. Post Exploitation
      • 6. Web Application
        • Web App Lab Setup
        • Web App - SQL Injection
        • Web App - XSS
        • Web App - Command Injection
        • Web App - Insecure File Upload
        • Web App - Authentication Attacks
        • Web App - XXE
        • Web App - IDOR
        • Web App - Capstone Practical Lab
      • 7. Wireless Attacks
      • 8. Legal Documentation & Report Writing
      • 🌐PEH References
  • 🏠syselement's Blog Home
Powered by GitBook
On this page
  • Commands
  • scp
  • rsync

Was this helpful?

Edit on GitHub
  1. Courses
  2. TCM - Linux 101
  3. 7. Utilities and File Editors

File Transfer

  • Use the command line shell to fransfer files.

Commands

scp

  • scp - secure file/dir copy using encrypted SSH protocol

# Copy file from a local pc to a remote pc
scp file.txt 192.168.1.50:/home/user/
# scp Source_path Destination_path

# Copy a directory and its contents
scp -r files 192.168.1.50:/home/user/
# "files" is a directory

# Copy file from remote
scp 192.168.1.50:/home/user/remote-file.txt /home/user/

# Use a remote user
scp file.txt user2@192.168.1.50:/home/user2/
file.txt     100%    8     1.9KB/s   00:00

rsync

  • rsync - fast and versatile file-copying tool for synchronizing files and directories between two locations over a remote shell (or local)

    • it is widely used for backups and mirroring

    • it sends only the differences between the source files and the existing files in the destination.

# Copy file from local pc to remote pc
rsync -azvh file2.txt user@192.168.1.50:/tmp/
    user@192.168.1.50's password: 
    sending incremental file list
    file2.txt
    sent 119 bytes  received 35 bytes  44.00 bytes/sec
    total size is 7  speedup is 0.05
# a = archive mode - recursive copying into directories and preserve files user permissions and ownership
# v = verbose mode
# z = compress data during transfer (beneficial for large files)
# h = human readable format output

rsync -azvh --progress file2.txt user@192.168.1.50:/tmp/
    file2.txt     7 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1)
    sent 119 bytes  received 35 bytes  34.22 bytes/sec
    total size is 7  speedup is 0.05
# Check the total bytes sent

--dry-run # Test run with no changes made

PreviousNetworking at the Command LineNextText Editors and Converters

Last updated 2 years ago

Was this helpful?