Can't remove or move file

Chad Perrin perrin at apotheon.com
Fri Aug 20 16:52:10 UTC 2010


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 ]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100820/251e5768/attachment.pgp


More information about the freebsd-questions mailing list