Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
You can also just list the hidden files with
$ ls -ldF .??*
or use whatever your favorite options are instead of -ldF
Cheers,
Ryan
> -----Original Message-----
> From: Mark Pecaut [mailto:EMAIL:PROTECTED]
> Sent: Tuesday, May 01, 2001 4:15 PM
> To: EMAIL:PROTECTED
> Subject: Re: [MLUG] minor annoyance with '..' files
>
>
> On Tue, May 01, 2001 at 04:05:39PM -0500, Finn, Michael wrote:
> > Slightly off Mike's topic but...
> >
> > My problem was somebody FTP'ed "backup" files from our
> Winblow server that
> > had a file extension of ".$$$" ... try to remove those
> simply... I couldn't
> > get them without getting the current original file they
> were backing up...
> >
> > -----Original Message-----
> > From: Stephen Montgomery-Smith [mailto:EMAIL:PROTECTED]
> > Sent: Tuesday, May 01, 2001 16:01
> > To: EMAIL:PROTECTED
> > Subject: Re: [MLUG] minor annoyance with '..' files
> >
> >
> > It depends upon what letter follows. I have always done
> something like
> >
> > ls ..[a-z]* ..[A-Z]*
> >
> > but that depends upon the 3rd character being a letter.
> >
> > Mike Miller wrote:
> > >
> > > I have some files that begin with '..' (don't ask, I have
> no idea).
> > > Anyway, it seems very difficult to produce a directory
> listing of just
> > > those files. These approaches always show the those
> files, but they also
> > > show files in the parent directory:
> > >
> > > ls ..*
> > > ls ./..*
> > > ls $PWD/..*
> > >
> > > It looks like it could be very dangerous to attempt to
> delete them using a
> > > wildcard!
> > >
> > > Is there a way to limit output of ls (or rm) to files within the
> > > directory? Some other trick?
>
> Put what you don't want the shell to expand in single quotes:
>
> $ touch '..beer'
> $ ls -l '..'*
> -rw-r--r-- 1 pecautm pecautm 0 May 1 16:12 ..beer
> $ rm -i '..'*
> remove ..beer? y
>
> -Mark
>
> > >
> > > Mike
> --
> To manage your subscription, go to
http://mlug.missouri.edu/members/edit.php
Archives are available at http://mlug.missouri.edu/list-archives/
--
To manage your subscription, go to http://mlug.missouri.edu/members/edit.php
Archives are available at http://mlug.missouri.edu/list-archives/