Re: Remove funny files
On Wed, 7 Jul 1999, Jiri Baum wrote: > Hello, > > Allan M. Wind: > > On 1999-07-04 20:22, Rolf Edlund wrote: > > > > > rm -i Backupfiles/--exclude=files.txt > > > > There are 2 tricks: > > > > 1. rm -i * (say no to everything that you want to keep) > > No, this doesn't work. The shell expands the `*', and rm is once again left > with a filename beginning with two dashes. I know, I have a lot of > ex-umsdos directories mounted over samba. This can actually be a very 'funny' command when you are trying to remove files in the current directory with names like '-f' and '-r'. NEVER use 'rm -i *' to delete a single file that has 'special' characters in its name. If you think you need it, you are wrong. And remember, always first use the 'ls' command instead of the 'rm' command to test what your options will expand to. 'rm -r .*' is another famous mistake you don't want to make. Try 'ls .*' to get an idea of what I'm talking about. > > 2. rm -- FILE > > That usually works, but not for all commands. Yes, or use 'rm ./FILE', like somebody else suggested. Remco -- rd1936: 1:05am up 27 days, 15:59, 7 users, load average: 1.10, 1.14, 1.14
Re: Remove funny files
Hello, Allan M. Wind: > On 1999-07-04 20:22, Rolf Edlund wrote: > > > rm -i Backupfiles/--exclude=files.txt > > There are 2 tricks: > > 1. rm -i * (say no to everything that you want to keep) No, this doesn't work. The shell expands the `*', and rm is once again left with a filename beginning with two dashes. I know, I have a lot of ex-umsdos directories mounted over samba. > 2. rm -- FILE That usually works, but not for all commands. (One that comes to mind is "cd". You have to say "cd ./DIRECTORY".) Jiri -- Jiri Baum <[EMAIL PROTECTED]> We'll know the future has arrived when every mailer transparently quotes lines that begin with "From ", but no-one remembers why.
Re: Remove funny files
as a common unix thing, all these funny files should be remove as rm ./funny-file. On Sun, Jul 04, 1999 at 08:22:56PM +0200, Rolf Edlund wrote: > Hi! > > I was playing around with Tar, and done a verry foolish thing.. :-) > > tar -cvf --exclude=files.txt allfiles.tar * > > That gives me a '--exclude=files.txt' file. Trying to remove it as 'rm -i > --exclude=files.txt' was unpossible. But when I go upp one directory, then > it was easy to remove the file. > > rm -i Backupfiles/--exclude=files.txt > > ..but maby you allready know about this. :-) > > - * Linux - a more stable way to live * - > > -- > Mvh Rolf Edlund > Tel:070-3049194 > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null > > -- Shao Zhang - Running Debian 2.1 ___ _ _ Department of Communications/ __| |_ __ _ ___ |_ / |_ __ _ _ _ __ _ University of New South Wales \__ \ ' \/ _` / _ \ / /| ' \/ _` | ' \/ _` | Sydney, Australia |___/_||_\__,_\___/ /___|_||_\__,_|_||_\__, | Email: [EMAIL PROTECTED] |___/ _
Re: Remove funny files
On Mon, 5 Jul 1999, Carl Mummert wrote: > > $ echo 'int main(){ unlink("--exclude_files=\"blah\"");}' > file.c && \ > > gcc file.c && ./a.out && rm -f a.out file.c & perl -e 'unlink q?--exclude_files="blah"?'
Re: Remove funny files
$ echo 'int main(){ unlink("--exclude_files=\"blah\"");}' > file.c && \ > gcc file.c && ./a.out && rm -f a.out file.c & Carl
Re: Remove funny files
On Mon, Jul 05, 1999 at 08:37:50PM +0100, Mark Brown wrote: > On Mon, Jul 05, 1999 at 01:49:55AM -0500, Michael Merten wrote: > > > Umm... wouldn't a simple > > >rm '--excude=files.txt' > > > work?? > > No. The problem is rm trying to interpret --exclude as an option, not > the shell being clever. > Ok, I got it now. I tried to 'touch --exclude=files.txt' and got the 'unknown option' error. So... touch ./--exclude=files.txt worked ok, as did rm ./--exclude=files.txt Mike -- Michael Merten <[EMAIL PROTECTED]> --> NRA Life Member (http://www.nra.org) --> Debian GNU/Linux Fan (http://www.debian.org) --> CenLA-LUG Member (http://www.angelfire.com/la2/cenlalug) -- It is illegal to say "Oh, Boy" in Jonesboro, Georgia.
Re: Remove funny files
On Mon, Jul 05, 1999 at 01:49:55AM -0500, Michael Merten wrote: > Umm... wouldn't a simple >rm '--excude=files.txt' > work?? No. The problem is rm trying to interpret --exclude as an option, not the shell being clever. -- Mark Brown mailto:[EMAIL PROTECTED] (Trying to avoid grumpiness) http://www.tardis.ed.ac.uk/~broonie/ EUFShttp://www.eusa.ed.ac.uk/societies/filmsoc/ pgplur5AGlgYN.pgp Description: PGP signature
Re: Remove funny files
On Mon, Jul 05, 1999 at 07:22:05AM +, Dan wrote: > Whats "excude"? > > >On Mon, 5 Jul 1999, Michael Merten wrote: > > > > > Umm... wouldn't a simple > > > > > >rm '--excude=files.txt' > > > > > > work?? > > > >That was one thing I tryed, but it din't work. > > > >rm: unrecognized option `--excude=files.txt' > >Try `rm --help' for more information. > > > > - * Linux - a more stable way to live * - > > > >-- > >Mvh Rolf Edlund > >Tel:070-3049194 > > > > excude is one of them thing-a-ma-jigs about... SO big... you know... I think them yankee's call'em typos -- Michael Merten <[EMAIL PROTECTED]> --> NRA Life Member (http://www.nra.org) --> Debian GNU/Linux Fan (http://www.debian.org) --> CenLA-LUG Member (http://www.angelfire.com/la2/cenlalug) -- "Give me the liberty to know, to utter, and to argue freely according to conscience, above all liberties." --John Milton [The Federalist (www.Federalist.com)]
Re: Remove funny files
Whats "excude"? On Mon, 5 Jul 1999, Michael Merten wrote: > Umm... wouldn't a simple > >rm '--excude=files.txt' > > work?? That was one thing I tryed, but it din't work. rm: unrecognized option `--excude=files.txt' Try `rm --help' for more information. - * Linux - a more stable way to live * - -- Mvh Rolf Edlund Tel:070-3049194 -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null ___ Get Free Email and Do More On The Web. Visit http://www.msn.com
Re: Remove funny files
On Mon, 5 Jul 1999, Michael Merten wrote: > Umm... wouldn't a simple > >rm '--excude=files.txt' > > work?? That was one thing I tryed, but it din't work. rm: unrecognized option `--excude=files.txt' Try `rm --help' for more information. - * Linux - a more stable way to live * - -- Mvh Rolf Edlund Tel:070-3049194
Re: Remove funny files
On Mon, Jul 05, 1999 at 05:51:50AM +0200, Rolf Edlund wrote: > On Sun, 4 Jul 1999, Martin Bialasinski wrote: > > > That is, rm -i -- --exclude=files.txt would have removed the file. > > One of the wonderful thing about Linux, is that there are several ways to > fix things. :-) > > - * Linux - a more stable way to live * - > > -- > Mvh Rolf Edlund > Tel:070-3049194 > Umm... wouldn't a simple rm '--excude=files.txt' work?? Mike -- Michael Merten <[EMAIL PROTECTED]> --> NRA Life Member (http://www.nra.org) --> Debian GNU/Linux Fan (http://www.debian.org) --> CenLA-LUG Member (http://www.angelfire.com/la2/cenlalug) -- >What is the status of Linux' Unicode implementation. Will Linux >be prepared for the first contact? We have full klingon console support just in case -- Alan Cox on linux-kernel
Re: Remove funny files
On Sun, 4 Jul 1999, Martin Bialasinski wrote: > That is, rm -i -- --exclude=files.txt would have removed the file. One of the wonderful thing about Linux, is that there are several ways to fix things. :-) - * Linux - a more stable way to live * - -- Mvh Rolf Edlund Tel:070-3049194
Re: Remove funny files
>> "Rolf" == Rolf Edlund <[EMAIL PROTECTED]> writes: Rolf> That gives me a '--exclude=files.txt' file. Trying to remove it Rolf> as 'rm -i --exclude=files.txt' was unpossible. But when I go upp Rolf> one directory, then it was easy to remove the file. -- starts an option. Commands, that accept --option style options use -- to indicate that the following words are to be taken literaly. That is, rm -i -- --exclude=files.txt would have removed the file. Ciao, Martin
Re: Remove funny files
On 1999-07-04 20:22, Rolf Edlund wrote: > rm -i Backupfiles/--exclude=files.txt There are 2 tricks: 1. rm -i * (say no to everything that you want to keep) 2. rm -- FILE In this case, 2 would work. /Allan -- Allan M. Wind Phone: 781.938.5272 (home) 687 Main Street, 2nd Floor Fax:781.938.6641 (fax/modem) Woburn, MA 01801Email: [EMAIL PROTECTED] (home)
Re: Remove funny files
On Sun, Jul 04, 1999 at 08:22:56PM +0200, Rolf Edlund wrote: > Hi! > > I was playing around with Tar, and done a verry foolish thing.. :-) > > tar -cvf --exclude=files.txt allfiles.tar * > > That gives me a '--exclude=files.txt' file. Trying to remove it as 'rm -i > --exclude=files.txt' was unpossible. But when I go upp one directory, then > it was easy to remove the file. > > rm -i Backupfiles/--exclude=files.txt > > ..but maby you allready know about this. :-) > > - * Linux - a more stable way to live * - > > -- > Mvh Rolf Edlund > Tel:070-3049194 > > > -- > Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] < /dev/null > Hi, I played around with it and I got it to delete by running mc then highlighting the offending file and pressing F8 hth -- __ _ Mark Wagnon Debian GNU/ -o) / / (_)__ __ __ Chula Vista, CA /\\/ /__/ / _ \/ // /\ \/ / [EMAIL PROTECTED] _\_v/_/_//_/\_,_/ /_/\_\ http://www.debian.org
Remove funny files
Hi! I was playing around with Tar, and done a verry foolish thing.. :-) tar -cvf --exclude=files.txt allfiles.tar * That gives me a '--exclude=files.txt' file. Trying to remove it as 'rm -i --exclude=files.txt' was unpossible. But when I go upp one directory, then it was easy to remove the file. rm -i Backupfiles/--exclude=files.txt ..but maby you allready know about this. :-) - * Linux - a more stable way to live * - -- Mvh Rolf Edlund Tel:070-3049194