find . \( ! -name "hobba*" \)
The above command invokes the "find" command asking it to search in the current directory (".") and return all files except those starting with the string "hobba". Note: Take care of the spaces as one more or less space character can ruin the whole script.
The above script is taken from a bash script written by Osama Magdy that deletes all files in a certain directory except one.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment