Searching Files
The "find" command enables you to find a file based on its name, type,
owner, creation time, size, group, and other criteria. The find command
looks as follows:
find directory -option criteria
Searching by Name
To locate a file by its name, use the -name option. For example, the
following command locates a file called report in the forecast
directory:
$find forecast -name report
The -print option instructs find to display the file(s) it locates and
their paths on the standard output. For example:
$find summer -name july_report.dat -print
summer/july_report.dat
If you specify an absolute path in the command, find will display
absolute paths, too:
$find /home/jane/summer -name july_report.dat -print
/home/jane/summer/july_report.dat
The special characters . and .. represent your current working directory
and its parent directory, respectively. To locate a file called
invoices.txt in the current directory and display the results on the
screen, type:
$find . -name invoices.txt -print
./invoices.txt
Searching by Type
The -type option enables you to locate a file according to its type.
-type takes a single character that specifies the file type as follows:
Symbol Meaning
b block device file
c character device file
d directory file
f regular file
p named pipe
l symbolic link
For example, to find the directory customers located under the /home
directory, type:
$find /home -name customers -type d -print
/home/letters/customers
Miscellaneous Criteria
You can locate files according to their size by using the -size option.
For example, to find a file whose size is 3 blocks, type:
$find customers -size 3
To specify a file's size in bytes rather than blocks, append the letter
'c' to the size value:
$find /home -size 2048c
To locate a file by its group, use the -group option:
$find /home -name outline -group developers
To locate all the files created during the last 15 minutes in the
current directory, use the -mmin option like this:
$find -mmin +0 -mmin -15
To find files that have been modified within the last two days, type:
$find -mtime -2
Wildcards
You may use shell wildcards as a filename. The following command locates
all the files that have a .h extension under the directory sources:
$find sources -name '*.h'
You must quote the filename when using wildcards. Otherwise, the shell
would attempt to evaluate the filename before passing it to the command.
» posted by ITworld staff
ITworld
Symantec Backup Exec 12 and Backup Exec System Recovery 8 deliver industry leading Windows data protection and system recovery. Download this whitepaper to find out the top reasons to upgrade and how to get continuous data protection and complete system recovery.
Data and system loss — from a hard drive failure, malicious attack, natural disaster, or simple human error — can happen anytime. Don’t leave your business vulnerable. Make sure you have a secure recovery strategy in place. Symantec's latest backup and system recovery technology can efficiently restore critical applications, individual emails and documents and even restore your entire system in minutes in the event of a loss.
Businesses face a growing challenge to ensure that the IT environment is properly protected. Backup Exec 12 integrates with other applications in the Symantec family of products, to complement your current data protection strategy, keep your data securely backed up and make it recoverable when you need it most.
Crimeware: Understanding New Attacks and Defenses
By Markus Jakobsson, Zulfikar Ramzan
Published Apr 6, 2008 by Addison-Wesley Professional. Part of the Symantec Press series.
Enter now! | Official rules | Sample chapter
Securing VoIP Networks: Threats, Vulnerabilities, and Countermeasures
By Peter Thermos, Ari Takanen
Published Aug 1, 2007 by Addison-Wesley Professional.
Enter now! | Official rules | Sample chapter







