Find Files

Posts tagged with

List all files starting with upper case

find . -type f -name ‘[[:upper:]]*’ If you want to change files to all lower case, e.g. your mp3 music files then run the following script. The -i option for the mv command stands for interactive, i.e. it will prompt for your approval. #!/bin/sh if [ $# -eq 0 ] ; then echo Usage: $0 …

Read more →

Find and delete files

find . -type f -iname “file(s)-to-delete” -exec rm -f {} ; The -iname makes it case insensitive, otherwise use -name. Of course you can also move them to say /tmp rather than deleting find . -type f -iname “file(s)-to-delete” -exec mv {} /tmp/ ;

Read more →