These commands and techniques provide basic file management capabilities in Linux. Depending on your specific needs, you may use additional utilities or options to perform more advanced file operations.

#cd Change directory.
Example: cd /path/to/directory
#pwdPrint working directory.
Example: pwd
#lslisting files
Example:
ls -l (long format), ls -a (including hidden files),
ls -lh (human-readable sizes).
#mkdirCreate directories.
Example: mkdir directory_name.
#touch Create empty files or update file timestamps.
Example:
touch filename.
#rm Remove files or directories.
Example:
rm filename,
rm -r directory_name (recursive).
#cp Copy files or directories.
Example:
cp source_file destination_file,
cp -r source_directory destination_directory (recursive).
#mvMove or rename files or directories.
Example:
mv source_file destination_file,
mv source_file new_name.
#catdisplay file content. Example: cat filename.
#lessView file content one page at a time. Example: less filename.
#headDisplay the first few lines of a file. Example: head filename.
#tailDisplay the last few lines of a file. Example: tail filename
#findSearch for files in a directory hierarchy.
Example: find /path/to/search -name filename.
#grepSearch for text patterns in files.
Example: grep pattern filename.
#chmodChange file permissions. Example: chmod 644 filename
#chownChange file ownership. Example: chown user:group filename
#tar Archive files and directories.
Example: tar -cvf archive.tar directory.
#ln -sA symbolic link is a special type of file that points to another file or directory.It acts as a shortcut or reference to the target file or directory
#dfDisplay disk space usage. Example: df -h (human-readable).
#duEstimate file space usage. Example: du -h (human-readable).

Leave a comment

Recent posts

Quote of the week

in learning you will teach and in teaching you will learn

~ Phil Collins
Design a site like this with WordPress.com
Get started