Essential Linux Commands for File Management
Classified in Computers
Written on in
English with a size of 4.57 KB
Essential Linux Commands for File Management
Basic Operations
mkdir /Destination/Name: Creates an empty directory named Name at the specified Destination.touch /Source: Updates the access and modification date of the Source file to the current time. If the file does not exist, it creates an empty file.
Copying Files
cp /Source/Destination: Copies the Source file to the Destination with the same name.cp -r /Source/Destination: Recursively copies files from the Source directory to the Destination directory, preserving the directory structure and file names.
Moving Files
mv -f /Source/Destination: Moves the Source file to the Destination, overwriting any existing file with the same name.mv -u /Source/Destination: Moves the Source file to the Destination