I present to you a compilation of the most useful Linux commands regarding File and Directory Operations
In commands that require entering file or directory names, you can press tab twice to autocomplete the path or get a list of available files.
Navigating Between Directories
Go to root directory
cdGo to previous directory
cd ..Enter directory (absolute path)
cd /directory1/directoryEnter directory (relative path)
cd directory1/directory2Go to user directory
cd ~Go to last visited directory
cd -Show current path
pwdListing Files and Directories
Show files and directories
lsShow files and directories with details
ls -lShow files and directories, including hidden ones
ls -aShow files and directories sorted by modification date
ls -ltShow files and directories in list format, including sizes
ls -lhFile and Directory Manipulation
Rename or move a file or directory
mv source destinationCopy a file
cp file destinationCopy a directory
cp -r source destinationDelete the file named file
rm fileDelete directory if it is empty
rm -d directoryDelete directory and its contents
rm -r directoryCreate new directory
mkdir directoryCreate multiple directories simultaneously
mkdir directory1 directory2Create directory path
mkdir -p /directory1/directory2Create empty file
touch fileChange file date (format year, month, day, and hour)
touch -t 19901230000 fileSymbolic Links
Create a symbolic link to the file or directory
ln -s file link1Create a hard link to the file or directory
ln file link1View details about a symbolic link
ls -l link1