This is a discussion on Linux searching for files in the server within the Getting started tutorials forums, part of the Linux Getting Started category; Hello folks. This is my first tutorial. For new Linux sys admin (or user ) like me searching file is ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hello folks.
This is my first tutorial. For new Linux sys admin (or user ) like me searching file is a hard task. You can use find command to search any file. Find command Syntax find /path/to/search -name "file-name" Examples Search myfile.txt : Code:
find / -name "myfile.txt" Code:
find / -name "*.conf" | more Code:
find / -name "*.conf" > /tmp/files.txt Code:
find / -perm /220 Code:
find /etc -mtime 0 Code:
find . -type f -name ˜*.tmp" -exec rm '{}' \;
Syntax: locate use to list files in databases that match a pattern. Find abc.txt file: Code:
locate abc.txt |
| Sponsored Links | ||
|
|
|
||||
|
Jerry, quick and dirty work. Keep it up. You can see more find command stuff:
http://www.cyberciti.biz/nixcraft/vi...with-find.html http://www.cyberciti.biz/faqs/2006/0...s-owned-by.php http://www.cyberciti.biz/nixcraft/vi...s-based-on.php http://www.cyberciti.biz/faqs/2006/0...move-files.php |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Searching Tutorial for setup Postfix SMTP-AUTH | satimis | Mail Servers | 0 | 01-25-2008 09:10 PM |
| script for FTP'ing 8 differnt server for pulling the files | vishal_titre | Shell scripting | 0 | 08-17-2007 07:09 PM |
| script for uploading files to a FTP server | marinm | Shell scripting | 7 | 01-02-2006 08:35 PM |
| searching for bad words script | marinm | Shell scripting | 1 | 02-03-2005 05:32 PM |