Quick Reference for noobs – find


Handy find references

Amplify’d from help.ubuntu.com
find $HOME -name 'mysong.ogg' 
find $HOME -iname '*.ogg' 

Locating Files by Size

find $HOME -iname '*.ogg' -size +100M 
find $HOME -iname '*.ogg' -type f -size -100M 

Locating Files by Access Time

find $HOME -atime +30

It is also possible to locate files based on their access time or the time that they were last used, or viewed by the system. For example to show all files that have not been accessed in the $HOME directory for 30 days or more:

This type of search is normally more useful when combined with other find searches. For example one could search for all ogg files in the $HOME directory that have an access time of greater than 30 days:

find $HOME -iname '*.ogg' -atime +30

  • -L : Follow symbolic links.
find [-H] [-L] [-P] [path...] [expression]

Read more at help.ubuntu.com

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s