Skip to content

Instantly share code, notes, and snippets.

# This command will search in the current directory and all sub directories for a file named rc.conf.
find . -name "rc.conf" -print
# This command will search in the current directory and all sub directories. All files named rc.conf will be processed by the chmod -o+r command. The argument '{}' inserts each found file into the chmod command line. The \; argument indicates the exec command line has ended.
find . -name "rc.conf" -exec chmod o+r '{}' \;
# This command will search in the current directory and all sub directories. All files that contain the string will have their path printed to standard output.
find . -exec grep "www.athabasca" '{}' \; -print
@boxfrommars
boxfrommars / walkman-copy.sh
Created November 27, 2011 20:11
copy files to sony walkman nwz-b163f from ubuntu with alphabetical sorting
find -type f -print0 | sort -z | cpio -0 -pd /media/WALKMAN/MUSIC/kn