This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

.bashrc function

Posted by: Anonymous Coward on July 10, 2006 08:29 PM
i use these functions in my ~/.bashrc:

# Find a file with a pattern in name:
function ff() { find . -type f -iname '*'$*'*' -ls ; }

# Find a file with pattern $1 in name and Execute $2 on it:
function fe() { find . -type f -iname '*'$1'*' -exec "${2:-file}" {} \; ; }

i got it from
<a href="http://www.tldp.org/LDP/abs/html/sample-bashrc.html" title="tldp.org">http://www.tldp.org/LDP/abs/html/sample-bashrc.ht<nobr>m<wbr></nobr> l</a tldp.org>

#

Return to CLI Magic: Searching with find