Delete files named "-a"

zhaozj2021-02-11  229

Delete files named "-a"

Skill administrator (2000-12-21 15:05) 〖Back〗 〖Forward〗

How to delete the file "-a"? (You can generate a "-a" file with $ echo "abcd"> -a.) If you use $ RM -A to use $ RM -A! Because the RM explains -A to command parameters, Not a variable. The correct way is: $ RM - -A or $ RM ./-A If you are interested, you can program it. $ Vi myrm.c int main (int Argc, char * argv [] ) {While (* argv) {Printf ("% s", * argv); unlink (* argv);}} $ cc myrm.c -o myrm $ myrm -a

转载请注明原文地址:https://www.9cbs.com/read-3552.html

New Post(0)