P. 1
Linux Kacper

Linux Kacper

5.0

|Views: 307|Likes:
Published by amit143mishra2009

More info:

Published by: amit143mishra2009 on Apr 01, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/10/2014

pdf

text

original

Command: fgrep

v fgrep is used to search for exact strings in text files.
v The fgrep contains various options.
v They are

è -i for ignore case.
è -v for displaying the lines that don’t match.
è -n for displaying the line number with the line where the match
was found.
v Syntax:$ fgrep [options] textfiles

Command: find

v The find command is used to find the files in the hard drive.
v By using the find command we can find the files by date and also we can
specify the range of times.
v Example: $ find /user/bin –type f –atime +100 –print
v
We can also use find to show the postscript files in our directory.
v Example: $ find *.pl
v
Syntax :$ find directory [options] [actions]

Fig. 4.2find command

LINUX TUTORIAL

35

07/10/2009

Linux Tutorial 1.0.doc

Command: locate

v The locate command is much faster than the find command.
v Finding a file using locate is faster when compared to the find command.
v The files are printed with the path if we use this command.
v Syntax:$ locate [search string]

Fig. 4.3 locate command

LINUX TUTORIAL

36

07/10/2009

Linux Tutorial 1.0.doc

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->