Linux Tutorial 01


Simple Commands


date : current date
cal : current month calendar
df : current free space
free : current free memory
exit : end a terminal session
pwd : current working directory


cd <directory_name> : changes to the mentioned directory
cd : changes to the home directory
cd – : changes to the previous working directory
cd ~user_name : changes to the home directory of user_name


ls : list directory contents
ls -l : list directory contents in long format
ls -ld */ : list directory in long format with directories only
ls -lF : list directory in long format, append an indicator character to the end of each listed name. For example, a “/” if the name is a directory.
ls -lh : list directory in long format, display file sizes in human readable format rather than in bytes.
ls -lhS : list directory in long format, sort by file size
ls -lhSr : list directory in long format, sort by file size in reverse order
ls -lt : list directory contents in long format and sort the result by file’s modification time
ls -ltr : list directory in long format, sort by file modification time in reverese order


file filename : brief description of file content
less filename : to view text files


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s