0% found this document useful (0 votes)
94 views1 page

Linux Commands Cheatsheet

This document is a cheatsheet for essential Linux commands. It includes commands for changing file permissions, removing files and directories, creating files and directories, displaying file contents, and searching for patterns. Examples are provided for each command to illustrate their usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views1 page

Linux Commands Cheatsheet

This document is a cheatsheet for essential Linux commands. It includes commands for changing file permissions, removing files and directories, creating files and directories, displaying file contents, and searching for patterns. Examples are provided for each command to illustrate their usage.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Linux Commands Cheatsheet

chmod: Change file permissions. E.g., chmod 755 file.txt

rm -r folder: Remove a directory and its contents. E.g., rm -r test_folder

rm file.txt: Delete a specific file. E.g., rm file.txt

touch / cat > file: Create an empty file or write to one. E.g., touch file.txt

cat file1 file2: Concatenate and display multiple files. E.g., cat file1.txt file2.txt

ls my_folder: List contents of a directory. E.g., ls Documents

ls -a -l -h: Show all files with details and readable sizes. E.g., ls -alh

ls *.log: List all .log files. E.g., ls *.log

mkdir: Create a new directory. E.g., mkdir new_folder

rmdir: Remove an empty directory. E.g., rmdir empty_folder

nano: Open nano editor. E.g., nano file.txt

grep: Search for patterns in files. E.g., grep 'word' file.txt

zip: Compress files into a zip archive. E.g., zip archive.zip file.txt

echo: Print or write text to a file. E.g., echo 'Hello' > file.txt

You might also like