1. rsync: This command is used for efficient file copying and synchronization between directories, even over a network. It's a powerful tool for backups and data migration.
Example:
bash
rsync -av source_directory/ destination_directory/
2. tar: Tar is used for archiving files and directories into a single file, often compressed. It's a fundamental tool for creating and extracting archives.
Example:
bash
tar -czvf archive.tar.gz directory_to_compress/
3. awk: Awk is a text processing tool that's especially useful for working with structured data like CSV files. It allows you to perform complex text manipulations.
Example:
bash
awk -F',' '{print $1}' data.csv
4. sed: Sed (stream editor) is another text manipulation tool that's handy for search and replace operations, text transformations, and more.
Example:
bash
sed 's/old_text/new_text/g' input.txt > output.txt
5. find: Find is used for searching files and directories based on various criteria such as name, size, and type. It's particularly useful for locating specific files.
Example:
bash
find /path/to/search -name "*.txt"
6. grep: Grep is a powerful tool for searching text patterns within files. It's commonly used for log analysis and text extraction.
Example:
bash
grep "search_text" file_to_search.txt
7. nc (netcat): Netcat is a versatile networking utility for reading from and writing to network connections. It can be used for port scanning, network testing, and more.
Example (listening on a port):
bash
nc -l -p 1234
8. scp: Secure Copy Protocol (scp) allows you to securely transfer files between hosts over SSH. It's useful for remote file copying.
Example (copying a file to a remote server):
bash
scp local_file.txt user@remote_server:/path/to/destination/
9. crontab: Crontab is used for scheduling tasks to run at specific times or intervals. It's essential for automating repetitive tasks.
Example (scheduling a script to run daily at 3:00 AM):
bash
0 3 * * * /path/to/script.sh
10. ps: The `ps` command provides information about running processes on your system. It's helpful for monitoring and troubleshooting.
Example (listing all processes):
bash
ps aux
No comments:
Post a Comment
Thank you for Commenting Will reply soon ......