Re: how do i extract a bullet from my foot (tar woes)
Karsten M. Self muttered: on Wed, Aug 22, 2001 at 11:17:32AM +1000, Brian May ([EMAIL PROTECTED]) wrote: I'm trying to remember a trick (probably in O'Reilly's _UNIX Power Tools_) for removing files by inode... Arg. In my first System V admin class, the instructor showed us how to specify the filename in octal so that you could manipulate filenames with un-typable chars. I realize that this trick would probably fail here (a dash - is a dash - is a dash -), but can anyone remind me how to do this? Paul -- Paul Mackinney [EMAIL PROTECTED] - Please note new email address
Re: how do i extract a bullet from my foot (tar woes)
On Saturday 25 August 2001 06:56, Paul Mackinney wrote: Karsten M. Self muttered: on Wed, Aug 22, 2001 at 11:17:32AM +1000, Brian May ([EMAIL PROTECTED]) wrote: I'm trying to remember a trick (probably in O'Reilly's _UNIX Power Tools_) for removing files by inode... Arg. In my first System V admin class, the instructor showed us how to specify the filename in octal so that you could manipulate filenames with un-typable chars. I realize that this trick would probably fail here (a dash - is a dash - is a dash -), but can anyone remind me how to do this? Paul The usual way of specifying octal is \0xx replacing xx by the appropriate digits. : The -b option to ls will show you these... Cliff
Re: how do i extract a bullet from my foot (tar woes)
On Wednesday 22 August 2001 21:28, Walter Hofmann wrote: On Tue, 21 Aug 2001, Karsten M. Self wrote: I'm trying to remember a trick (probably in O'Reilly's _UNIX Power Tools_) for removing files by inode. Trying to remember what it was or in what context it worked. Unmount the filesystem, then do [EMAIL PROTECTED]:~ /sbin/debugfs debugfs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 debugfs: open -w /dev/device_with_file_system debugfs: clri 11 debugfs: quit Mmm. I would be very circumspect about using debugfs, a typo astray... A little story. Long ago I worked on Edition 6 of UNIX as a systems programmer. We wrote a file system editor (this was in the days before efsck). There was no manual page written for it..on the grounds that (I quote my boss at the time) You shouldn''t use it unless you could have written it yourself Mmm..nostalgia, it ain't what it used to be... Cliff [EMAIL PROTECTED]:~ /sbin/e2fsck -f /dev/device_with_file_system e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Entry 'random name' in / (2) has deleted/unused inode 11. Cleary? yes ... Use the inode number of the file you want to clear instead of 11. Walter
Re: how do i extract a bullet from my foot (tar woes)
On Tue, Aug 21, 2001 at 08:32:40PM -0400, [EMAIL PROTECTED] wrote: In linux.debian.user, you wrote: hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried rm -f --remove-files rm -f '--remove-files' rm -f \\-\\-remove\\-files rm -f \-\-remove\-files rm -f '\\-\\-remove\\-files' rm -f '\-\-remove\-files' all with the same lack of success! any assist in this would be most appreciated. -- regards, allen wayne best Another way to remove it would be to go to the directory and run 'mc' (midnight commander) Highlight the offending file and do F8. Anita This is amazing :) Someone ought to write a HOWTO on this. How to remove files with problematic filenames The -- feature is obviously the *right* way, but the least creative. There are other little challenges for the reader. Create a file whose name is backspace or has a clear screen sequence as it's name and try to delete it, using rm -i is cheating. Remember the only disallowed characters in a filename are NULL and / Keep on rocking Cliff -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: how do i extract a bullet from my foot (tar woes)
On Mon, Aug 20, 2001 at 02:26:37PM -0700, allen wayne best just ramblin in his amx wrote: hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast rm -- --remove-files (-- turns the option processing off - man getopt) MisoFrankie -- The danger from computers is not that they will eventually get as smart as men but that we will meanwhile agree to meet them halfway. pgpWtTYKJ1s38.pgp Description: PGP signature
Re: how do i extract a bullet from my foot (tar woes)
On Tue, 21 Aug 2001, Karsten M. Self wrote: I'm trying to remember a trick (probably in O'Reilly's _UNIX Power Tools_) for removing files by inode. Trying to remember what it was or in what context it worked. Unmount the filesystem, then do [EMAIL PROTECTED]:~ /sbin/debugfs debugfs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 debugfs: open -w /dev/device_with_file_system debugfs: clri 11 debugfs: quit [EMAIL PROTECTED]:~ /sbin/e2fsck -f /dev/device_with_file_system e2fsck 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09 Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Entry 'random name' in / (2) has deleted/unused inode 11. Cleary? yes ... Use the inode number of the file you want to clear instead of 11. Walter
Re: how do i extract a bullet from my foot (tar woes)
On Mon, Aug 20, 2001 at 02:26:37PM -0700, allen wayne best just ramblin in his amx wrote: hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast rm -- --remove-files Cliff
Re: how do i extract a bullet from my foot (tar woes)
On Mon, Aug 20, 2001 at 02:54:52PM -0700, Greg Wiley wrote: On Monday, August 20, 2001 2:26 PM, [EMAIL PROTECTED] wrote: silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried Here is a C program that will do it: #include unistd.h int main() { char *fname = --remove-files; unlink( fname ); return 0; } No need for anything so drastic ! The -- flag turns off flag interpretation with many commands.. see info rm Cliff
Re: how do i extract a bullet from my foot (tar woes)
It has been suggested already that `rm -- --remove-files` is the proper way, but `rm ??remove-files` will also do the trick (but could erase a lot more, so watch out)! Cheers, Viktor -- Viktor Rosenfeld WWW: http://www.informatik.hu-berlin.de/~rosenfel/
Re: how do i extract a bullet from my foot (tar woes)
On Mon, Aug 20, 2001 at 04:38:02PM -0700, Karsten M. Self wrote: Yet another solution: $ find . -type f -name '--remove-files' -exec rm -f {} \; ...which is just a longwinded way of saying rm -f ./--remove-files. (Unless you have a subdirectory containing another file named --remove-files, in which case it will get 'rm -f'ed too.) -- With the arrest of Dimitry Sklyarov it has become apparent that it is not safe for non US software engineers to visit the United States. - Alan Cox To prevent unauthorized reading... - Adobe eBook reader license
Re: how do i extract a bullet from my foot (tar woes)
At 2001-08-20T23:38:02Z, Karsten M. Self kmself@ix.netcom.com writes: Yet another solution: $ find . -type f -name '--remove-files' -exec rm -f {} \; Since we're getting creative: perl -e unlink('--remove-files'); is my obligatory contribution. :) -- Kirk Strauser
Re: how do i extract a bullet from my foot (tar woes)
Viktor Rosenfeld schrieb am Dienstag, den 21. August 2001: but `rm ??remove-files` will also do the trick No, it gets globbed to rm --remove-files so this won't work. Walter
Re: how do i extract a bullet from my foot (tar woes)
allen wayne best just ramblin in his amx wrote: hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried rm -f --remove-files rm -f '--remove-files' rm -f \\-\\-remove\\-files rm -f \-\-remove\-files rm -f '\\-\\-remove\\-files' rm -f '\-\-remove\-files' all with the same lack of success! any assist in this would be most appreciated. Here's another: rm -i *files
Re: how do i extract a bullet from my foot (tar woes)
Try rm -- --remove-files The -- makes it take all following args as args and not options. This is a standard thing for most of the GNU or Unix tools. rm ./--remove-files would work too. Got those from man rm :). On Wed, Aug 22, 2001 at 07:28:26AM +1000, Darren Marsh wrote: allen wayne best just ramblin in his amx wrote: hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried rm -f --remove-files rm -f '--remove-files' rm -f \\-\\-remove\\-files rm -f \-\-remove\-files rm -f '\\-\\-remove\\-files' rm -f '\-\-remove\-files' all with the same lack of success! any assist in this would be most appreciated. Here's another: rm -i *files -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: how do i extract a bullet from my foot (tar woes)
Walter Hofmann wrote: Viktor Rosenfeld schrieb am Dienstag, den 21. August 2001: but `rm ??remove-files` will also do the trick No, it gets globbed to rm --remove-files so this won't work. Argh, now that you're pointing my nose at it, I can see it too! This won't help anything. Oh well, you never stop learning. Cheers, Viktor -- Viktor Rosenfeld WWW: http://www.informatik.hu-berlin.de/~rosenfel/
Re: how do i extract a bullet from my foot (tar woes)
In linux.debian.user, you wrote: hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried rm -f --remove-files rm -f '--remove-files' rm -f \\-\\-remove\\-files rm -f \-\-remove\-files rm -f '\\-\\-remove\\-files' rm -f '\-\-remove\-files' all with the same lack of success! any assist in this would be most appreciated. -- regards, allen wayne best Another way to remove it would be to go to the directory and run 'mc' (midnight commander) Highlight the offending file and do F8. Anita
Re: how do i extract a bullet from my foot (tar woes)
Darren == Darren Marsh [EMAIL PROTECTED] writes: Darren rm -i *files [520] [scrooge:bam] ~ rm -i *files rm: unrecognized option `--remove-files' Try `rm --help' for more information. wont work, because it just calls rm with parameters -i and --remove-files, and rm can't tell the difference. -- Brian May [EMAIL PROTECTED]
Re: how do i extract a bullet from my foot (tar woes)
Karsten == Karsten M Self kmself@ix.netcom.com writes: Karsten $ find . -type f -name '--remove-files' -exec rm -f Karsten {} \; If it weren't for the fact that find prefixes the name of the file with ./, then this wouldn't work. A simpler thing which does exactly the same thing (and surprisingly nobody seems to have mentioned it yet) is: rm -f ./--remove-files -- Brian May [EMAIL PROTECTED]
Re: how do i extract a bullet from my foot (tar woes)
on Wed, Aug 22, 2001 at 11:17:32AM +1000, Brian May ([EMAIL PROTECTED]) wrote: Karsten == Karsten M Self kmself@ix.netcom.com writes: Karsten $ find . -type f -name '--remove-files' -exec rm -f Karsten {} \; If it weren't for the fact that find prefixes the name of the file with ./, then this wouldn't work. Note that I was posting an alternative, the 'rm -- --remove-files' solution is the one I'd generally recommend. I'm trying to remember a trick (probably in O'Reilly's _UNIX Power Tools_) for removing files by inode. Trying to remember what it was or in what context it worked. I think it was for files with odd characters which would be interpreted as argument seperators, not for files beginning with a dash or double-dash. -- Karsten M. Self kmself@ix.netcom.com http://kmself.home.netcom.com/ What part of Gestalt don't you understand? There is no K5 cabal http://gestalt-system.sourceforge.net/ http://www.kuro5hin.org Free Dmitry! Boycott Adobe! Repeal the DMCA!http://www.freesklyarov.org Geek for Hirehttp://kmself.home.netcom.com/resume.html pgpOua0TzcDW3.pgp Description: PGP signature
Re: how do i extract a bullet from my foot (tar woes)
Brian May wrote: A simpler thing which does exactly the same thing (and surprisingly nobody seems to have mentioned it yet) is: rm -f ./--remove-files :-) Good answer. Whenever I have to delete a file with a difficult name and fail after a few tries, I simply call up Emacs, run `dired' on the directory and select the file for deletion. Always works for me. Peter
how do i extract a bullet from my foot (tar woes)
hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried rm -f --remove-files rm -f '--remove-files' rm -f \\-\\-remove\\-files rm -f \-\-remove\-files rm -f '\\-\\-remove\\-files' rm -f '\-\-remove\-files' all with the same lack of success! any assist in this would be most appreciated. -- regards, allen wayne best contractor, diagnostics and support tools telnet 447-4070 your friendly neighborhood rambler owner my rambler will go from 0 to 105 Current date: 3:21:14::231:2001 Today's snit invasion consists of 0.262215392198414 e +6.55679747127197 snits (Approximated!)
Re: how do i extract a bullet from my foot (tar woes)
On Monday, August 20, 2001 2:26 PM, [EMAIL PROTECTED] wrote: silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried Here is a C program that will do it: #include unistd.h int main() { char *fname = --remove-files; unlink( fname ); return 0; } Hope it helps. -=greg
Re: how do i extract a bullet from my foot (tar woes)
On Monday 20 August 2001 04:54 pm, Greg Wiley wrote: On Monday, August 20, 2001 2:26 PM, [EMAIL PROTECTED] wrote: silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried Here is a C program that will do it: rm ./-remove-files is a lot simpler. -- Bud Rogers [EMAIL PROTECTED] http://www.sirinet.net/~budr All things in moderation. And not too much moderation either.
Re: how do i extract a bullet from my foot (tar woes)
Try this: rm -- --remove-files The '--' means 'none of the following arguments are command line switches, even if they really look like one.' best, Aaron On Monday 20 August 2001 14:26, allen wayne best just ramblin in his amx wrote: hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast
Re: how do i extract a bullet from my foot (tar woes)
* allen wayne best just ramblin in his amx [EMAIL PROTECTED] spake thus: hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried rm -f --remove-files rm -f '--remove-files' rm -f \\-\\-remove\\-files rm -f \-\-remove\-files rm -f '\\-\\-remove\\-files' rm -f '\-\-remove\-files' all with the same lack of success! read man rm, and you will end up using rm -- --remove-files :) Stig -- www.brautaset.org
Re: how do i extract a bullet from my foot (tar woes)
greg, bud: thank you very much. my disk has much more room now. thanks for the prompt replies. On Monday 20 August 2001 15:03, Bud Rogers wrote: On Monday 20 August 2001 04:54 pm, Greg Wiley wrote: On Monday, August 20, 2001 2:26 PM, [EMAIL PROTECTED] wrote: silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried Here is a C program that will do it: rm ./-remove-files is a lot simpler. -- regards, allen wayne best contractor, diagnostics and support tools telnet 447-4070 your friendly neighborhood rambler owner my rambler will go from 0 to 105 Current date: 44:1:15::231:2001 Today's snit invasion consists of 0.422093404456973 e +6.09633141663289 snits (Approximated!)
Re: how do i extract a bullet from my foot (tar woes)
on Mon, Aug 20, 2001 at 02:26:37PM -0700, allen wayne best just ramblin in his amx ([EMAIL PROTECTED]) wrote: hello: i have managed to insert a bullet in my poda courtesy of tar and my ineptness! that is, i did: tar -cvIf --remove-files /tmp/foo.tz /opt/tmp silly me filled up my current directory with a file called --remove-files. my question is: how the heck to i get rid of this beast i've tried rm -f --remove-files rm -f '--remove-files' rm -f \\-\\-remove\\-files rm -f \-\-remove\-files rm -f '\\-\\-remove\\-files' rm -f '\-\-remove\-files' all with the same lack of success! any assist in this would be most appreciated. Yet another solution: $ find . -type f -name '--remove-files' -exec rm -f {} \; Cheers. -- Karsten M. Self kmself@ix.netcom.com http://kmself.home.netcom.com/ What part of Gestalt don't you understand? There is no K5 cabal http://gestalt-system.sourceforge.net/ http://www.kuro5hin.org Free Dmitry! Boycott Adobe! Repeal the DMCA!http://www.freesklyarov.org Geek for Hirehttp://kmself.home.netcom.com/resume.html pgpgJy6BTwhtx.pgp Description: PGP signature