Linux / UNIX Tech Support Forum
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 free or login to your existing account and remove all advertisements. |
|
|||||||
| Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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 |
![]() |
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 | 1 | 06-05-2009 07:04 AM |
| 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 |