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