D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Linux cli help!

 

On Thu, 2008-08-28 at 13:34 +0100, dclug@xxxxxxxxxxxxxxxx wrote:
> >
> > On Thu, 28 Aug 2008, dclug@xxxxxxxxxxxxxxxx wrote:
> >
> >> Hi All,
> >> I'm using PuTTY on a windows box to access a linux based NAS box via
> >> ssh.
> >> I'm trying to delete some files on it but cannot get them off.
> >> I think the files have bad filenames, ls -l shows:
> >> -rwxrw-rw-    1 guest    guest       39936 May 26  2004 ##   ABB
> >> ACS550.xls*
> >
> >> It's the ##'s that bother me - not sure where they came from
> >
> >> and what's with the * at the end?
> >
> > That's ls' -F flag telling you the file is executable.
> >
> >> The filename comes up in green - does that mean anything?
> >
> > This is ls' colour support telling you the file is executable.
> >
> >> Also how come there's no f (indicating a file) at the start?
> >
> > There never is, files are always a dash for the first part of that line.
> >
> >> When I try to delete the file nothing happens, the console just sits
> >> there, it still accepts keyboard input but doesn't do anything else.
> >
> > Can you show us the exact command?
> >
> > rm "##   ABB ACS550.xls" should work for you.
> >
> >> Can I abort a command once started instead of just closing the console
> >> window and logging in again?
> >
> > Try ctrl-c, failing that ctrl-z and kill the process.
> >
> > Alex.
> >
> > --
> 
> Thanks for the reply Alex and thanks for explaining ls' output
> I've just tried this command:
> rm "##   ABB ACS550.xls"
> and it still hangs the console and neither ctrl-c or ctrl-z work in
> killing the process (don't forget I'm using PuTTY - I don't know if this
> makes a difference).
> It's weird, I can't delete these files using ftp, a mapped network drive
> in windows, the NAS' own web file manager, or directly using the method
> above.
> Formatting the drive seems a bit extreme to just get rid of some files and
> it's not to say I won't have this problem again in the future...
> Confused...
>
Can you run 'ls -i' to get the inode number? If so then execute:

    find . -inum xxx -exec /bin/rm {} \;

where 'xxx' is the inode number.



John.

-- 
---------------------------------------------------------------
John Horne, University of Plymouth, UK  Tel: +44 (0)1752 587287
E-mail: John.Horne@xxxxxxxxxxxxxx       Fax: +44 (0)1752 587001

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html