mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 13:42:11 +01:00
16 lines
478 B
Text
16 lines
478 B
Text
# find all file name ending with .pdf and remove them
|
|
find -name *.pdf | xargs rm -rf
|
|
|
|
# if file name contains spaces you should use this instead
|
|
find -name *.pdf | xargs -I{} rm -rf '{}'
|
|
|
|
# Will show every .pdf like:
|
|
# &toto.pdf=
|
|
# &titi.pdf=
|
|
# -n1 => One file by one file. ( -n2 => 2 files by 2 files )
|
|
|
|
find -name *.pdf | xargs -I{} -n1 echo '&{}='
|
|
|
|
# If find returns no result, do not run rm
|
|
# This option is a GNU extension.
|
|
find -name "*.pdf" | xargs --no-run-if-empty rm
|