Timeline for Remove files that start with but don't contain
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 6, 2018 at 23:42 | comment | added | user313992 |
none of your commands will remove a file with the name master-of-puppets
|
|
| Nov 6, 2018 at 23:27 | comment | added | Robert Zabkiewicz |
No, it not works this way. You can not specify numbers in [ ] braces. Only digits. You specify which digits will be places in the place of [xxxxxxx]. So max possibilities is range from 0 to 9 like this [0-9] or this [0123456789]. This can replace only one character from file name. rob@vps:mast$ ls master-1990 master-1994 master-2006 master-2010 master-2014 master-2018 master-1991 master-1995 master-2007 master-2009 master-2013 master-2017 rob@vps:mast$ rm master-[2000-2019]* rob@vps:mast$ ls empty directory`
|
|
| Nov 6, 2018 at 23:24 | history | edited | Robert Zabkiewicz | CC BY-SA 4.0 |
Is sufficient to run only first two of four rm -rf commands
|
| Nov 6, 2018 at 23:22 | comment | added | Dan | Ahh so, rm -rf master-????[2019-9999]* would remove all files from master-2019* to master-9999*? | |
| Nov 6, 2018 at 23:20 | review | First posts | |||
| Nov 6, 2018 at 23:49 | |||||
| Nov 6, 2018 at 23:18 | history | answered | Robert Zabkiewicz | CC BY-SA 4.0 |