Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Aug 2010 10:49:39 -0600
From:      Chad Perrin <perrin@apotheon.com>
To:        FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: Can't remove or move file
Message-ID:  <20100820164939.GB50581@guilt.hydra>
In-Reply-To: <4C6EAD63.5040609@comcast.net>
References:  <4C6EA6B6.6090307@comcast.net> <4C6EA802.9010105@gmail.com> <4C6EAD63.5040609@comcast.net>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Fri, Aug 20, 2010 at 09:29:23AM -0700, Rem P Roberti wrote:
>  On 08/20/10 09:06, Mark Tinguely wrote:
> >
> >For many commands, the "--" stops the argument processing:
> >
> >   rm -- -elDeJaPWGg.flv
> 
> Thank you.  Still deep into the FreeBSD learning curve, but loving it.  
> I should have recognized that the "-" would indicated a switch, but even 
> if I had, I would not have known the fix.  Thanks again.

There are a couple more ways to get around this.  One requires planning
ahead, the other requires less typing (if you hand-typed the filename).

If you want to plan ahead, you can use the -o option with youtube-dl:

    youtube-dl -o output_filename.flv 'url_for_youtube_video'

This sets the name of the file that will appear on your computer to
"output_filename.flv", so you control what the file is called.

If it's too late to plan ahead, as in the case of -elDeJaPWGg.flv, you
can just use a filename glob:

    rm *PWGg.flv

Whether this works depends on your shell, though.  In tcsh, for instance,
it won't work, and you'll have to use the -- option as suggested by Mark
Tinguely.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAkxusiMACgkQ9mn/Pj01uKWtfgCgmMtjDwadDLd0QwPbILHT3WXK
1SIAoJ5MWkzrMmQ1cBc1qkpCWTlhT0KM
=NerG
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100820164939.GB50581>