Tag: xubuntu
-
How to Recursively Delete a File Type in a Directory – Unix
Use find Example uses deletion of mp4 files. Run find /some/dir/ -maxdepth 10 -type f -name “*.mp4” You will see a list of mp4 files. Now you just need to add -delete option to delete them. The complete Command find /some/dir/ -maxdepth 10 -type f -name “*.mp4” – delete
-
How to Recursively Copy a Folder Excluding Certain File Types in Unix
Use rsync rsync -aP –exclude=*.mp4 /folder1/* /folder2/ -a : Recursive -P: Shows progress –exclude: You cause use file types or directory here. For multiple file types, you can use multiple exclude commands. For example –exclude=*.jpg –exclude=*.png