bash - How do delete a file named ".." on a Linux system -
i encountered mysterious file on webserver today.
[root@hosting wwwbeta]# ls -la "mydir" total 600 drwxr-xr-x 7 apache apache 4096 jan 5 15:40 . drwxr-xr-x 38 apache apache 4096 jan 5 13:41 .. -rwxr-xr-x 1 root root 337 mar 25 2014 .. -rwxr-xr-x 1 root root 3225 jun 6 2014 more files any ideas on how rid of file? i've tried sorts of things rm, thinks i'm referring directory. i'm trying careful, because production server.
i guess there spaces after .. meaning file has been created this:
touch '.. ' you not recognize space using ls.
i use find delete file:
find -maxdepth 1 -type f -name '..*' -delete using -type f ensure not attempt remove parent folder (which not work anyway since not empty)
btw, should concerned security file can been created accident or erroneous script. if file should "come back" after deletion should concerned.
Comments
Post a Comment