User Tools

Site Tools


linux:general:quickreference

This is an old revision of the document!


File Commands

ls - List the content of the current directory
ls -R - List the subdirectories recursively
ls -a - List all the content, including hidden files
ls -l - List the content and its information
pwd - Output the current directory that you are in
cd folder1 – Change the working directory to folder1
cd - Return to the $Home directory
cd .. - Go up a directory
cd - - Return to the previous directory
cp source destination – Copy source to destination
cp -r source destination – Copy a folder recursively from source to destination
mv source destination - Move (or rename) a file from source to destination
rm file1 - Remove file1
rm -f file1 - Remove file1 without prompt
rm -r folder - Remove a folder and its content recursively
mkdir foldername – Create a new folder foldername
rmdir foldername – Remove an empty folder
file file1 – Show the file type of file1
cat file1 file2 – Concatenate file1 to file 2
cat > file1 – Concatenate standard input to file1
less file1 - View and paginate file1
head file1 - Show first 10 lines of file1
tail file1 - Show last 10 lines of file1
chmod 777 file - Change file permission of file to 777
chown user:group file - Change ownership of file to user and group group
ln -s source destination – Create a symbolic link from source to destination

System Commands

linux/general/quickreference.1503955042.txt.gz · Last modified: 2017/08/28 21:17 by rplecko