im a new student in programming and im stuck on this question so please please HELP ME. thanks.
the question is this:
enter a command to delete all files that have filenames starting with labtest, except labtest itself (delete all files startign with 'labtest' followed by one or more characters.
rm -r -- !(labtest.*) didnt work.
I'm sure that somebody will come up with a one line command, but...
You could do it with 3 commands.
Rename labtest to any other name , then delete all files labtest* and then rename the file back to labtest.
i can only write one line to do this. this is sort of a tutorial.
---------- Post updated at 06:24 PM ---------- Previous update was at 06:13 PM ----------
i just got it its
rm labtest?*