Re: Removing a file whose name starts with '-', was Re: How …

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Kevin Fries
Date:  
To: Main PLUG discussion list
Subject: Re: Removing a file whose name starts with '-', was Re: How to command line rotate an image?
Put the filename in single (not double) quotes.

Kevin Fries

On Nov 12, 2010 8:26 AM, "Mike Ballon" <> wrote:

OK, this is the last time I answer from the bar :)

I didn't mean that using inodes was the "only" way, I just knew it would
work.

I also stated that the syntax might not be correct as I didn't test it.

[name@hostd1 ~]$ ls -li
total 64
31758 -rw-rw-r-- 1 user group 4549 Oct 21 14:50 text.html
[name@hostd1 ~]$ find . -inum 31758 -exec rm -i {} \;
rm: remove regular file `./text.html'? y

You could also use find . -inum 31758 | xargs rm

I think CLI users should be aware of multiple options so thanks to those
that replied with how to escape the special characters.

-Mike

On Fri, Nov 12, 2010 at 9:42 AM, Dale Farnsworth <>
wrote:

> > > > I don't know who to rotate the image, but to delete your file you
> need > > to use the inode. T...
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss