Dedicated Servers
Managed Dedicated Servers
Semi-Dedicated Hosting
Cheap Dedicated Servers
Hyper-V VPS Hosting
Hyper-V Virtual Private Servers
Linux VPS Hosting
VPS Hosting with Root Access
Windows VPS Hosting
Windows VPS Web Hosting
Reseller Hosting
Reseller Hosting India
cPanel Shared Hosting
Linux Shared Web Hosting
Windows Hosting
Windows Shared Web Hosting
Web Hosting Blog
Web Hosting Blog India
Hosting Knowledgebase
Web Hosting Knowledgebase




  #1 (permalink)  
Old 09-17-2008, 08:02 PM
Member
 
Join Date: Oct 2006
Posts: 54
Default How to search with find.

The find command is one of the useful and powerful command in Linux.
Following are some useful commands to search the data using find.

find -name "*.jpg"

Above command searches the current directory and all subdirectories for files that end in .jpg

find /home -name "*.jpg"

Serach the filename with .jpg extension under /home

find /home -name "*.jpg" -size 100k

Search the filename with .jpg extension having size less than 100k

find /home -name "*.jpg" -size +100k

Search the filename with .jpg extension having size greater than 100k

find /home -name "*.jpg" -size +100k -user Alan

Search the filename with .jpg extension having size greater than 100k and owned by Alan

You can use -perm to specify which permissions a file should have for it to be matched

find /home -perm -o=rw
Search the filename for other which has permission set read/write

find /home -perm 777
Search the filename which has permission set read/write/execute

Enjoy
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT. The time now is 02:21 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0