0% found this document useful (0 votes)
16 views1 page

WX272 Linux Command Cheat Sheet

This Linux command cheat sheet provides concise descriptions and examples of common Linux commands like pwd, cd, ls, ll, file, cp, mv, cat, more, and man. pwd prints the current directory, cd changes directories, ls and ll list directory contents with basic and additional information, file prints the file type, cp copies files, mv moves or renames files, cat prints file contents to the terminal, more pages through file contents one screen at a time, and man prints the manual for commands.

Uploaded by

Harsha DEVOPS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

WX272 Linux Command Cheat Sheet

This Linux command cheat sheet provides concise descriptions and examples of common Linux commands like pwd, cd, ls, ll, file, cp, mv, cat, more, and man. pwd prints the current directory, cd changes directories, ls and ll list directory contents with basic and additional information, file prints the file type, cp copies files, mv moves or renames files, cat prints file contents to the terminal, more pages through file contents one screen at a time, and man prints the manual for commands.

Uploaded by

Harsha DEVOPS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Linux Command Cheat Sheet

Command Description Usage/Example


pwd Print the full path to the pwd
directory you are in
cd change directory Full path:
cd /home/students/user/wx272
Relative path:
cd ../wx272
ls List the contents of a Print all contents of present directory:
directory (or specify a ls
pattern to match)
Print all contents of present directory that start
with ‘gfs’ and end with ‘.nc’:
ls gfs*.nc
ll List the contents of a Print all contents of present directory:
directory (or specify a ll
pattern to match) with
additional information Print all contents of present directory that start
(permissions, file size, with ‘nam’ and end with ‘.grib2’:
date file modified) ll nam*.grib2
ls –ld Print ownership and Print the ownership and permissions for your
permissions information home directory:
about a directory ls –ld /home/students/username
file Print the file type Print the file type of image.gif:
file image.gif
cp Copy a file Copy file1.txt as file2.txt:
cp file1.txt file2.txt
mv Move or rename a file Rename file1.txt to file2.txt:
mv file1.txt file2.txt

Move file1.txt from the home directory to the


wx272 directory:
mv ~/file1.txt ~/wx272/
cat Print all the contents of a Print all the contents of file1.txt to the terminal:
file to the terminal cat file1.txt
more Print the contents of a Print the contents of file1.txt to the terminal:
file to the terminal one more file1.txt
page at a time
man Print more information Print the manual page for the command ls:
about a command man ls

You might also like