SlideShare a Scribd company logo
1 of 15
nano
vi These editors are used in console mode.
vim
gvim
gedit These editors are used in graphical mode.
Emacs
VI editor/ VIM editor:
There are three modes in vi editors:
ex mode(default mode, by pressing escape key, this mode is used for saving and exit )
Insert mode (by pressing insert or I key, this mode is used for editing)
Replace mode (this mode is used for replacing text written, by again pressing insert
or r key)
For saving & exiting document- come on esc mode and write :wq
For setting line numbers in document come on esc mode and write : se nu
For coming on any specific line press line no. and then ‘G’ (ex- 102 then G)
For going at the end of page press ‘G’
For going at the top of page press gg
Vim editor is not installed default when you install linux, you have to install vim
editor. It is the enhanced version of vi editor.
# vim/vi filename
Press ‘v’ to come to visual mode, here we can select the matter which we want
to copy , press ‘yy’ to copy (y stands for yank). Press ‘p’ to paste that matter.
Press ‘dd’ to delete a particular line where cursor is.
More options (on esc. mode):
I - Starts editing from starting of Line where your cursor is.
a - Starts appending after the character where the cursor is.
A - Starts appending from the end of the line where cursor is.
o - Creates a new line below that line where the cursor is.
O - Creates a new line above the line where the cursor is.
r - Replace only character where cursor is placed.
R - Replace from the cursor start an ends where you want.
For replacing many words in a file (for ex- if we have made a file, in that file many
times dog word is written and we want to replace word dog with cat), open file
with vi editor and on esc. Mode type
:%s/dog/cat/g
 sed ‘s/dog/cat/g’ filename (show file with replaced word)
These commands are called CUPS (Common Unix Printing System)
 system-config-printer - To initialize Printer graphically
 lpstat - To check the status of printer
 lprm <job id> - To cancel the printing
 lpq - To check the printing queue status
 a2ps - Change normal text to Post Script
 ps2pdf - Changes post script to pdf
 lpr <filename> <Printer> - Sends printing
 mount /dev/cdrom /mnt - To mount CD ROM.
 mount /dev/device name/mnt - To mount any external device.
 mount -t vfat /dev/partition /mnt - To mount fat partition.
 mount -t nfs <server IP>:/var/dump /mnt- To mount NFS.
 blkid - To see device id (ex- hda1, sdb).
 du -h <partition> - To check how much partition is used.
 lsmod - List of drivers running.
 modinfo - Details about running driver
 df -h <partition> - To check the free space of a partition.
 sort <filename> - Short file in a-z format.
 sort -d <filename> - Short file in dictionary format.
 sort -r <filename> - Short file in z-a format.
 tr ‘a-z’ ‘A-Z’ <filename> - Translate file in all capital letters
 wc (-l/-w/-c ) <filename> - Word count
 (-l for line, -w for word, -c for character)
diff file1 file2 - To see difference between
 same looking files.
 ps - To check the processing status.
 kill -9 PID - To kill the service no. 9.
 find / -name <filename>- Searches file in /.
 find -perm 775 - Searches for files having permission 775.
 find -size ± 512k - Searches for files of 512k
 find -name *.htm - Searches files having extension .htm.
 cut –f1 –d : /etc/passwd - It will show the first column of passwd file
 cut –c 1-3 /etc/passwd > new file- Creates a new file.
 paste new file file - Pastes the matter of new file in file.
 less <filename> - To see a file pagewise.
 grep <word> <filename>- To find a particular word or string in a file.
 grep –n <word> <filename>- To see the line number in which that word is
 locate <name> - Locate all files which has that name.
 tar -cvf <name> <filesname> - It will take the backup of files as a
single file.
 tar -tvf <name> - Show how many files & their name in
the backup file.
 tar -xvf <name> - Restore the backup.
 tar -rvf <name> <filesname> - It will append the backup.
 gzip <filename> - It will compress a file.
 bzip2 <filename> - It will compress a file.
 gunzip <filename>.gz - It will decompress a file.
 bunzip2 <filename>.b2z - It will decompress a file.
 zcat <filename.gz> - To see the content of compress file
To edit or see init level
# vi /etc/inittab
0 = shutdown
1 = single user mode
2 = multiuser mode without NFS support
3 = full multiuser mode
4 = not used
5 = Graphical (x11)
6 = reboot
crontab -e -u username
*/1 * * * * echo ‘Hello’ > /dev/tty2 (min, hour, date, month, day)
save file.
 service crond restart (now when user login on 2nd
terminal it will get
message hello after every 1 min.)
 crontab -l -u username (to see how many crontab are running for user)
 crontab -r -u username (deletes the crontab)
 crontab –e
11 12 * * * mkdir rahul

More Related Content

What's hot

Linux commd
Linux commdLinux commd
Linux commdragav03
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOSAdamFallon4
 
Linux commands
Linux commandsLinux commands
Linux commandsU.P Police
 
Linux commands part -2
Linux commands part -2Linux commands part -2
Linux commands part -2bhatvijetha
 
Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014Noé Fernández-Pozo
 
Linux fundamental - Chap 05 filter
Linux fundamental - Chap 05 filterLinux fundamental - Chap 05 filter
Linux fundamental - Chap 05 filterKenny (netman)
 
Linux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellLinux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellKenny (netman)
 
Gnome terminal basics
Gnome terminal basicsGnome terminal basics
Gnome terminal basicsKamrul Hasan
 

What's hot (12)

Linux commd
Linux commdLinux commd
Linux commd
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOS
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Babitha.linux
Babitha.linuxBabitha.linux
Babitha.linux
 
Linux commands
Linux commandsLinux commands
Linux commands
 
Linux cheat sheet
Linux cheat sheetLinux cheat sheet
Linux cheat sheet
 
Linux commands part -2
Linux commands part -2Linux commands part -2
Linux commands part -2
 
Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014Unix Command-Line Cheat Sheet BTI2014
Unix Command-Line Cheat Sheet BTI2014
 
Linux fundamental - Chap 05 filter
Linux fundamental - Chap 05 filterLinux fundamental - Chap 05 filter
Linux fundamental - Chap 05 filter
 
Prabu linux
Prabu linuxPrabu linux
Prabu linux
 
Linux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shellLinux fundamental - Chap 00 shell
Linux fundamental - Chap 00 shell
 
Gnome terminal basics
Gnome terminal basicsGnome terminal basics
Gnome terminal basics
 

Viewers also liked

global fertiliser market scenario
global fertiliser market scenarioglobal fertiliser market scenario
global fertiliser market scenarioNaveen Nayak
 
aetiology and pathogenesis of chronic obstructive lung disease
aetiology and pathogenesis of chronic obstructive lung diseaseaetiology and pathogenesis of chronic obstructive lung disease
aetiology and pathogenesis of chronic obstructive lung diseaseDr. Kanishk Sharma
 

Viewers also liked (6)

global fertiliser market scenario
global fertiliser market scenarioglobal fertiliser market scenario
global fertiliser market scenario
 
aetiology and pathogenesis of chronic obstructive lung disease
aetiology and pathogenesis of chronic obstructive lung diseaseaetiology and pathogenesis of chronic obstructive lung disease
aetiology and pathogenesis of chronic obstructive lung disease
 
Paralytic squint
Paralytic squintParalytic squint
Paralytic squint
 
S parameters
S parametersS parameters
S parameters
 
Sampling
SamplingSampling
Sampling
 
Thyroid cancers
Thyroid cancersThyroid cancers
Thyroid cancers
 

Similar to Rhel2

Unix / Linux Command Reference
Unix / Linux Command ReferenceUnix / Linux Command Reference
Unix / Linux Command ReferenceSumankumar Panchal
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdfGiovaRossi
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdfGiovaRossi
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdfGiovaRossi
 
Basic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersBasic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersDevanand Gehlot
 
Linux commands
Linux commandsLinux commands
Linux commandsshekhar70
 
workshop_1.ppt
workshop_1.pptworkshop_1.ppt
workshop_1.ppthazhamina
 
Termux commands-list
Termux commands-listTermux commands-list
Termux commands-listDhanushR24
 
Terminal linux commands_ Fedora based
Terminal  linux commands_ Fedora basedTerminal  linux commands_ Fedora based
Terminal linux commands_ Fedora basedNavin Thapa
 
List command linux fidora
List command linux fidoraList command linux fidora
List command linux fidoraJinyuan Loh
 
Rhel 6.2 complete ebook
Rhel 6.2 complete ebookRhel 6.2 complete ebook
Rhel 6.2 complete ebookYash Gulati
 
Rhel 6.2 complete ebook
Rhel 6.2  complete ebookRhel 6.2  complete ebook
Rhel 6.2 complete ebookYash Gulati
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
Linux Command.pptx
Linux Command.pptxLinux Command.pptx
Linux Command.pptxSaileshB5
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manualSaikat Rakshit
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manualCraig Cannon
 

Similar to Rhel2 (20)

Examples -partII
Examples -partIIExamples -partII
Examples -partII
 
Unix / Linux Command Reference
Unix / Linux Command ReferenceUnix / Linux Command Reference
Unix / Linux Command Reference
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdf
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdf
 
unix_ref_card.pdf
unix_ref_card.pdfunix_ref_card.pdf
unix_ref_card.pdf
 
Basic shell commands by Jeremy Sanders
Basic shell commands by Jeremy SandersBasic shell commands by Jeremy Sanders
Basic shell commands by Jeremy Sanders
 
Linux commands
Linux commandsLinux commands
Linux commands
 
workshop_1.ppt
workshop_1.pptworkshop_1.ppt
workshop_1.ppt
 
Unix commands
Unix commandsUnix commands
Unix commands
 
Termux commands-list
Termux commands-listTermux commands-list
Termux commands-list
 
Terminal linux commands_ Fedora based
Terminal  linux commands_ Fedora basedTerminal  linux commands_ Fedora based
Terminal linux commands_ Fedora based
 
List command linux fidora
List command linux fidoraList command linux fidora
List command linux fidora
 
Unix slideshare
Unix slideshareUnix slideshare
Unix slideshare
 
Rhel 6.2 complete ebook
Rhel 6.2 complete ebookRhel 6.2 complete ebook
Rhel 6.2 complete ebook
 
Rhel 6.2 complete ebook
Rhel 6.2  complete ebookRhel 6.2  complete ebook
Rhel 6.2 complete ebook
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Linux Command.pptx
Linux Command.pptxLinux Command.pptx
Linux Command.pptx
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
 
58518522 study-aix
58518522 study-aix58518522 study-aix
58518522 study-aix
 

Recently uploaded

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Recently uploaded (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Rhel2

  • 1.
  • 2. nano vi These editors are used in console mode. vim gvim gedit These editors are used in graphical mode. Emacs
  • 3. VI editor/ VIM editor: There are three modes in vi editors: ex mode(default mode, by pressing escape key, this mode is used for saving and exit ) Insert mode (by pressing insert or I key, this mode is used for editing) Replace mode (this mode is used for replacing text written, by again pressing insert or r key) For saving & exiting document- come on esc mode and write :wq For setting line numbers in document come on esc mode and write : se nu For coming on any specific line press line no. and then ‘G’ (ex- 102 then G) For going at the end of page press ‘G’ For going at the top of page press gg
  • 4. Vim editor is not installed default when you install linux, you have to install vim editor. It is the enhanced version of vi editor. # vim/vi filename Press ‘v’ to come to visual mode, here we can select the matter which we want to copy , press ‘yy’ to copy (y stands for yank). Press ‘p’ to paste that matter. Press ‘dd’ to delete a particular line where cursor is.
  • 5. More options (on esc. mode): I - Starts editing from starting of Line where your cursor is. a - Starts appending after the character where the cursor is. A - Starts appending from the end of the line where cursor is. o - Creates a new line below that line where the cursor is. O - Creates a new line above the line where the cursor is. r - Replace only character where cursor is placed. R - Replace from the cursor start an ends where you want.
  • 6. For replacing many words in a file (for ex- if we have made a file, in that file many times dog word is written and we want to replace word dog with cat), open file with vi editor and on esc. Mode type :%s/dog/cat/g  sed ‘s/dog/cat/g’ filename (show file with replaced word)
  • 7. These commands are called CUPS (Common Unix Printing System)  system-config-printer - To initialize Printer graphically  lpstat - To check the status of printer  lprm <job id> - To cancel the printing  lpq - To check the printing queue status  a2ps - Change normal text to Post Script  ps2pdf - Changes post script to pdf  lpr <filename> <Printer> - Sends printing
  • 8.  mount /dev/cdrom /mnt - To mount CD ROM.  mount /dev/device name/mnt - To mount any external device.  mount -t vfat /dev/partition /mnt - To mount fat partition.  mount -t nfs <server IP>:/var/dump /mnt- To mount NFS.
  • 9.  blkid - To see device id (ex- hda1, sdb).  du -h <partition> - To check how much partition is used.  lsmod - List of drivers running.  modinfo - Details about running driver  df -h <partition> - To check the free space of a partition.
  • 10.  sort <filename> - Short file in a-z format.  sort -d <filename> - Short file in dictionary format.  sort -r <filename> - Short file in z-a format.  tr ‘a-z’ ‘A-Z’ <filename> - Translate file in all capital letters  wc (-l/-w/-c ) <filename> - Word count  (-l for line, -w for word, -c for character) diff file1 file2 - To see difference between  same looking files.  ps - To check the processing status.  kill -9 PID - To kill the service no. 9.
  • 11.  find / -name <filename>- Searches file in /.  find -perm 775 - Searches for files having permission 775.  find -size ± 512k - Searches for files of 512k  find -name *.htm - Searches files having extension .htm.  cut –f1 –d : /etc/passwd - It will show the first column of passwd file  cut –c 1-3 /etc/passwd > new file- Creates a new file.  paste new file file - Pastes the matter of new file in file.  less <filename> - To see a file pagewise.  grep <word> <filename>- To find a particular word or string in a file.  grep –n <word> <filename>- To see the line number in which that word is  locate <name> - Locate all files which has that name.
  • 12.  tar -cvf <name> <filesname> - It will take the backup of files as a single file.  tar -tvf <name> - Show how many files & their name in the backup file.  tar -xvf <name> - Restore the backup.  tar -rvf <name> <filesname> - It will append the backup.
  • 13.  gzip <filename> - It will compress a file.  bzip2 <filename> - It will compress a file.  gunzip <filename>.gz - It will decompress a file.  bunzip2 <filename>.b2z - It will decompress a file.  zcat <filename.gz> - To see the content of compress file
  • 14. To edit or see init level # vi /etc/inittab 0 = shutdown 1 = single user mode 2 = multiuser mode without NFS support 3 = full multiuser mode 4 = not used 5 = Graphical (x11) 6 = reboot
  • 15. crontab -e -u username */1 * * * * echo ‘Hello’ > /dev/tty2 (min, hour, date, month, day) save file.  service crond restart (now when user login on 2nd terminal it will get message hello after every 1 min.)  crontab -l -u username (to see how many crontab are running for user)  crontab -r -u username (deletes the crontab)  crontab –e 11 12 * * * mkdir rahul