Linux Files And Directories Commands

Click to share! ⬇️
Linux-Files-And-Directories-Commands

In this table, we have compiled a list of some of the most commonly used Linux file commands. These commands can be used to perform a variety of tasks related to files and directories, such as listing the contents of a directory, creating and deleting files and directories, moving and copying files and directories, changing file and directory permissions and ownership, and manipulating the contents of files.

The table is organized by function, with each command listed along with a brief description of what it does. By understanding and using these commands, you should be able to work with files and directories in Linux more efficiently and effectively.

CommandDescription
lsLists the contents of a directory.
cdChanges the current working directory.
pwdPrints the current working directory.
mkdirCreates a new directory.
rmdirDeletes an empty directory.
rmDeletes a file or directory.
mvMoves or renames a file or directory.
cpCopies a file or directory.
chmodChanges the permissions of a file or directory.
chownChanges the owner of a file or directory.
chgrpChanges the group of a file or directory.
touchCreates an empty file or updates the timestamp of an existing file.
catConcatenates and prints the contents of one or more files.
headPrints the first few lines of a file.
tailPrints the last few lines of a file.
lessDisplays a file a page at a time.
grepSearches for a pattern in the contents of one or more files.
findSearches for files and directories based on various criteria.
sortSorts the lines of a file.
uniqRemoves duplicate lines from a file.
wcCounts the lines, words, and characters of a file.
cutExtracts selected fields from a file.
pasteMerges lines of files.
joinJoins lines of two files based on a common field.
sedEdits the contents of a file using a script.
awkProcesses the contents of a file using a script.
tarArchives and compresses files.
gzipCompresses a file.
bzip2Compresses a file.
gunzipDecompresses a gzip-compressed file.
bunzip2Decompresses a bzip2-compressed file.
Click to share! ⬇️