Merge pull request #43 from pierrepo/master

find + pdftk + gs
This commit is contained in:
Chris Lane 2013-09-01 10:16:27 -07:00
commit ad66169acc
3 changed files with 20 additions and 1 deletions

View file

@ -1,4 +1,4 @@
# To find files by extension (ex: .jpg):
# To find files by cas insensitive extension (ex: .jpg, .JPG, .jpG):
find . -iname "*.jpg"
# To find directories:
@ -12,3 +12,13 @@ find . -type f -perm 777
# To find files with setuid bit set:
find . -xdev \( -perm -4000 \) -type f -print0 | xargs -0 ls -l
# To find files with extension '.txt' and remove them:
find ./path/ -name '*.txt' -exec rm '{}' \;
# To find files with extension '.txt' and look for a string into them:
find ./path/ -name '*.txt' | xargs grep 'string'
# To find files with size bigger than 5 Mb and sort them by size:
find ./ -size +5M -type f -print0 | xargs -0 ls -Ssh

3
cheatsheets/gs Normal file
View file

@ -0,0 +1,3 @@
# To reduce the size of a pdf file:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf

6
cheatsheets/pdftk Normal file
View file

@ -0,0 +1,6 @@
# Concatenate all pdf files into one:
pdftk *.pdf cat output all.pdf
# Concatenate pages 1 to 5 of first.pdf with page 3 of second.pdf
pdftk A=fist.pdf B=second.pdf cat A1-5 B3 output new.pdf