pretty cool trick i loving linux
what if i want to do that in a script using rm command with multiple pattern
for example in the command prompt i type remove /home ".c" ".text" "~"
remove would be the name of my script so $1=/home, $2=the patterns
would this code work
for -d in $1 do
rm -regex ".$2"
Quote:
Originally Posted by amboxer21
Hi James, This will remove any files with the extensions c or text:
Code:
find /home/ -regex ".*\(text\|c\)$" -delete
|