Created
January 7, 2011 10:58
-
-
Save j-manu/769355 to your computer and use it in GitHub Desktop.
Bash Tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# extract only the filename without extension | |
for i in *.xhtml | |
do | |
filename=$(basename $i}); | |
extension=${filename##*.}; | |
filename=${filename%.*}; | |
wkhtmltopdf -O landscape -s A3 $i $filename'.pdf'; | |
done | |
--- | |
#Delete large number of files: | |
ls|xargs -L 1000 rm | |
-- | |
# remove all files older than 7 days | |
find /path/to/directory* -mtime +7 -exec rm {} \; | |
# remove all *.py files younger than 30 minutes | |
find /path/to/directory* -name '*.py' -mmin -30 -exec rm {} \; | |
-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment