root@cheat
tar -xzvf
Extract a compressed gzip archive. Decompresses and extracts files from a tar.gz file.
tar -czvf
Create a compressed gzip archive. Combines multiple files/folders into a single compressed file.
tail -f
Display the last lines of a file and follow new additions. -f flag follows the file in real-time.
head
Display the first lines of a file. Default shows first 10 lines, -n specifies number of lines.
less
View file contents page by page. Allows scrolling through large files with keyboard navigation.
cat
Display file contents. Concatenate and display files to standard output.
touch
Create an empty file or update file timestamps. If the file exists, updates its modification time.
rmdir
Remove empty directories. Only works on directories that contain no files.
mkdir -p
Create directories including parent directories. The -p flag creates parent directories as needed.
mv
Move or rename files and directories. Can move files between directories or rename them.
cp -r
Copy files or directories recursively. The -r flag copies directories and their contents.
cd
Change the current directory. Navigate to different folders in the file system.
pwd
Print the current working directory path. Shows the full path of where you are in the file system.
rm -rf
Forcefully remove files and directories recursively. USE WITH EXTREME CAUTION!
find
Find files by name in a directory tree
grep
Search for text patterns recursively in files
ls
List all files including hidden ones with detailed information