[CLUE-Tech] Some CLI examples for new people
Jeff Falgout
JFalgout at co.jefferson.co.us
Thu Nov 6 08:29:54 MST 2003
>>
I'd like to put together a "show" of about 5 commands that will flow
into each other and show the power of CLI. I'm npen to suggestions.
>>>
Don't forget about find with the -exec switch. Way powerful!!
find . -type f -exec chmod 700 {} \;
Find all files in the current directory and below and execute chmod
700
on each one.
I use this a lot to also run perl one liners, for example to do a find
and
replace to change a hyperlink in html files.
find . -type f -exec perl -p -i -e 's/foo/bar/ {} \;
will find files in current directory and replace foo with bar.
HTH
Jeff
More information about the clue-tech
mailing list