Difference between revisions of "Find / GZIP"
From Nocrashwiki
(Created page with "Find to exclude certain results. This will find all files in the current directory excluding .gz .png, .tif*, .mov, .gif and .jpg and others... find . -type f -not -name '*.gz'...") |
|||
Line 1: | Line 1: | ||
Find to exclude certain results. | Find to exclude certain results. | ||
+ | <br/>This will find all files in the current directory excluding .gz .png, .tif*, .mov, .gif and .jpg and others... | ||
− | + | find . -type f -not -name '*.gz' -not -name *.png -not -name '*.tif*' -not -name *.mov -not -name *.jpg -not -name '*.jpeg' -not -name '*.avi' -not -name *.gif -not -name '*.bz2' -not -name '*.zip' -not -name '*.rar' -exec gzip --best -v {} \; | |
− | + | ||
+ | Find files in a certain date range: | ||
+ | touch temp -t 200604141130 | ||
+ | touch ntemp -t 200604261630 | ||
+ | find /data/ -cnewer temp -and ! -cnewer ntemp |
Latest revision as of 13:00, 4 May 2012
Find to exclude certain results.
This will find all files in the current directory excluding .gz .png, .tif*, .mov, .gif and .jpg and others...
find . -type f -not -name '*.gz' -not -name *.png -not -name '*.tif*' -not -name *.mov -not -name *.jpg -not -name '*.jpeg' -not -name '*.avi' -not -name *.gif -not -name '*.bz2' -not -name '*.zip' -not -name '*.rar' -exec gzip --best -v {} \;
Find files in a certain date range:
touch temp -t 200604141130 touch ntemp -t 200604261630 find /data/ -cnewer temp -and ! -cnewer ntemp