Andrew Libby on 5 Jul 2016 15:39:55 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Undeletable file, how to get rid of it?



So I'm pretty sure the $ should be omitted when submitting to the
rm command.  The $ indicated and end of line.  It's not actually in
the file name, I'm pretty sure it's output from ls rather than being
the file name:

alibby-2:~ alibby$ mkdir tmp
alibby-2:~ alibby$ cd tmp
alibby-2:tmp alibby$ touch one two three
alibby-2:tmp alibby$ ls -l
total 0
-rw-r--r--  1 alibby  staff  0 Jul  5 18:37 one
-rw-r--r--  1 alibby  staff  0 Jul  5 18:37 three
-rw-r--r--  1 alibby  staff  0 Jul  5 18:37 two

alibby-2:tmp alibby$ ls | cat -v -e -t
one$
three$
two$
alibby-2:tmp alibby$ ls -l | cat -v -e -t
total 0$
-rw-r--r--  1 alibby  staff  0 Jul  5 18:37 one$
-rw-r--r--  1 alibby  staff  0 Jul  5 18:37 three$
-rw-r--r--  1 alibby  staff  0 Jul  5 18:37 two$

If you rm 'cifs4936' do you get the same error?

Also just for giggles, what did lsattr yield?

Thanks,

Andy

On 7/5/16 6:25 PM, Michael Lazin wrote:
> I don't know if it pertains, but we had an issue with an office NAS
> where users were mounting it with sshfs and copying files to it, and the
> files which were copied in this manner were only deletable by the user
> that created it because of the file ownership.  If you can check the
> file ownership please do so.  It may be the issue.
> 
> Cheers,
> 
> Michael
> 
> On Tue, Jul 5, 2016 at 3:20 PM, Greg Helledy <gregsonh@gra-inc.com
> <mailto:gregsonh@gra-inc.com>> wrote:
> 
>     One thing I had not given much thought to when I posted my question
>     is that the NAS box that the file is sitting on is probably not
>     using a linux file system.  It is a WD MyCloud EX4, I assume it's
>     using NTFS.
> 
>     I tried this command:
>     >ls | cat -v -e -t
>     and got:
>     >cifs4936$
>     but when I tried:
>     >rm cifs4936$
>     I still got:
>     >rm: cannot remove ‘cifs4936$’: No such file or directory
> 
>     A co-worker (who is suspicious about linux, and is responsible for
>     that NAS device) logged in via windows NET USE, and windows shows
>     the file being deleted, but when you go up a directory and back in,
>     the file has re-appeared.  He suggested that the FTP software was
>     re-writing the file.  I proved that false by shutting down the
>     server...the behavior didn't change.
> 
>     What would you do at this point?  This isn't so much a linux
>     question anymore, I suppose, is it time for a call to WD?
> 
>     -- 
>     Greg Helledy
>     GRA, Incorporated
>     P:  +1 215-884-7500 <tel:%2B1%20215-884-7500>
>     F:  +1 215-884-1385 <tel:%2B1%20215-884-1385>
>     www.gra.aero <http://www.gra.aero>
> 
>     On 7/5/2016 4:01 PM, plug-request@lists.phillylinux.org
>     <mailto:plug-request@lists.phillylinux.org> wrote:
> 
>         Undeletable file, how to get rid of it?
> 
>     ___________________________________________________________________________
>     Philadelphia Linux Users Group         --       
>     http://www.phillylinux.org
>     Announcements -
>     http://lists.phillylinux.org/mailman/listinfo/plug-announce
>     General Discussion  -- 
>      http://lists.phillylinux.org/mailman/listinfo/plug
> 
> 
> 
> 
> -- 
> Michael Lazin
> 
> to gar auto estin noein te kai ennai
> 
> 
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
> 

-- 
Andrew Libby
alibby@xforty.com
484-887-7505 x 1115
http://xforty.com
http://www.kineticweb.com/
http://zugunroute.com
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug