linux-file-commands.txt
# List files and directories
ls

# Change directory
cd [directory]

# Print the current directory
pwd

# Create a new directory
mkdir [directory]

# Remove an empty directory
rmdir [directory]

# Delete a file
rm [file]

# Remove a directory and its contents recursively
rm -r [directory]

# Copy files or directories
cp [source] [destination]

# Move or rename files or directories
mv [source] [destination]

# Create an empty file or update its timestamp
touch [file]

# Display the contents of a file
cat [file]

# View a file one page at a time
less [file]

# Open a file in the Vim text editor
vim [file]

# Change file permissions
chmod [mode] [file]

# Change the owner of a file
chown [user] [file]

# Search for files by name
find [directory] -name [file]

# Search for a specific pattern in a file
grep "[pattern]" [file]

# Compress a file using gzip
gzip [file]

# Display disk space usage in human-readable format
df -h

Linux File Commands Cheat Sheet