Top Ad unit 728 × 90

Latest updates

recent

LINUX-BASIC-COMMANDS



#### TO CHECK THE PRESENT WORKING LOCATION ####
# pwd


#### TO CHECK THE CONTENTS OF DIRECTORY ####
# ls


#### TO CHECK THE PROPERTIES OF FILES & DIRECTORIES ####
# ll


#### TO CHECK THE HIDDEN FILES & DIRECTORIES ####
# ls –a


#### TO CHECK THE INODE NUMBER OF FILES & DIRECTORIES ####
# ls –i


#### TO CREATE A FILE WITH DATA ####
# cat > (filename)
# cat > linux
This is linux
Press ctrl+D to save & quit the file
# cat linux (to read the file)


#### TO APPEND THE DATA WITHOUT OVERWRITING ####
# cat >> linux
Added data by root
Press ctrl+D to save & quit the file
# cat linux (read the file)


#### TO CREATE MULTIPLE FILES WITHOUT DATA ####
# touch unix solaris redhat
# ls (to check)


#### TO CREATE A DIRECTORY ####
# mkdir <dir_name>
# mkdir zoom
# ls (to check)
# cd zoom (to enter into dir)
# cd (to come out)


#### TO CREATE A MULTIPLE DIRECTORIES ####
# mkdir zoom1 zoom2 zoom3 zoom4
# ls (to check)


#### TO CREATE A PARENT DIRECTORY ####
# mkdir –p world/asia/india/ap/hyd/dsnr/zoom
# ls –R world (to check)


#### NAVIGATION OF DIRECTORIES ####
# cd world/asia/india/ap/hyd/dsnr/zoom
# pwd (to check)
# cd .. (to come 1 step back)
# cd ../.. (to come 2 step back)
# cd ../../.. (to come 3 step back)
# cd – (to go at last working directory)
# cd (to go at user home directory)
# pwd (to check)


#### TO CHECK AND CHANGE THE DATE & TIME ####
# date (to check)
# date –s “wed Mar 19 12:00:00 IST 2014”


#### TO CHECK THE CALENDER ####
# cal (for current month & year)
# cal 2014 (for year)
# cal 5 2014 (for particular month & year)


#### TO OPEN THE CALCULATOR ####
# bc
1+2+3
7
Type „q‟ to come out


#### TO GET THE HELP RELATED TO ANY COMMAND ####
# man <command name>
# man cat (for example)
Type „q‟ to come out


#### TO SHUTDOWN THE SYSTEM ####
# init 0


#### TO RESTART THE SYSTEM ####
# init 6


#### TO SEARCH FILES OR DIRECTORIES ####
# find / -iname <filename or dirname>


#### TO ACCESS ANY LOCATION IN GUI ####
# nautilus <Path>
# nautilus /etc (for example)


#### TO COPY A EXISTING FILE WITH NEW NAME ####
# cp <source_file> <new_name>
# cp linux unix
# ls (to check)
# cat unix (to read)


#### TO COPY FILE INTO DIFFERENT LOCATION ####
# cp (filename) (destination)
# cp linux /opt
# ls /opt (to check)


#### TO COPY MULTIPLE FILES ####
# cp unix redhat solaris /opt
# ls /opt (to check)


#### TO COPY DATA FROM SOURCE FILE TO DESTINATION WITHOUT
OVERWRITING ####
# cat (source_file) >> (destination_file)
# cat linux >> redhat
# cat redhat (to check)


#### TO COPY A DIRECTORY ####
# cp –rv (source_dir) (destination)
# cp –rv zoom /opt
# ls /opt (to check)


#### TO COPY MULTIPLE DIRECTORIES ####
# cp –rv zoom1 zoom2 zoom3 /opt
# ls /opt (to check)


#### TO COPY COMPLETE DATA FROM PRESENT WORKING LOCATION ####
# cp –rv * /media
# ls /media (to check)


#### TO CUT & PASTE FILE OR DIRECTORIES ####
# mv (source_dir or file) (destination)
# mv zoom /mnt
# ls (to check)
# ls /mnt (to check)


#### TO RENAME A FILE OR DIRECTORY ####
# mv (existing_name) (new_name)
# mv zoom1 zoomgroup
# ls (to check)


#### TO REMOVE A FILE OR DIRECTORY ####
# rm (filename)
# rm –rf (directory_name)


#### TO OPEN THE TASK MANAGER ####
# ps –aux


#### TO KILL THE PROCESS OF RUNNING APPLICATION ####
# kill -9 (process_id)
# kill -9 2354 (for example)


#### TO CHECK THE CONFIGURATION OF CPU ####
# cat /proc/cpuinfo


#### TO CHECK THE RUNNING PROCESS OF CPU ####
# top


#### TO CHECK THE OS VERSION ####
# cat /etc/redhat-release


#### TO CHECK THE LAST LOGIN TIME ####
# last
LINUX-BASIC-COMMANDS Reviewed by Unknown on 12:38 PM Rating: 5
© 2007 - 2016. All Rights Reserved by Babashaheer Blog

Contact Form

Name

Email *

Message *

Powered by Blogger.