
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] How to cope with strange filenames in bash?
On Tue, Jul 03, 2007 at 09:28:42AM +0200, Michal Hajek wrote:
>
> Hello,
>
> a simple question:
>
> how do I cope in bash with filenames containing "-" character (i.e.
> dash) ?
>
> In my case, I have downloaded this file:
> -umai-Doremi--Kenichi-10--B36CAB67-.avi.part1.rar
>
> What is so special about it? This:
>
Depending upon the command, one or the other of these should work.
mv ./-umai-Doremi-blah-blah
With some other commands (though not mv) prefacing the command with
another - will work.
touch - -stupidname
rm - -stupidname
The ./ seems to work in more circumstances.
(Of course, you have to be in the directory containing the file.)
Actually, if you're in a directory above it, using tab completion might
work.
mkdir test
touch test/-stupidname
mv test/- <hit tab key, it will complete -stupidname> bettername
ls test
bettername
>From the directory containing the rar file, say the directory's name is
rar
cd ../
--
Scott Robbins
PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
Buffy: See, this is a school. And we have students and they check
out books and then they learn things.
Giles: I was beginning to suspect that was a myth.
Home |
Main Index |
Thread Index