Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 43 |
Nodes: | 6 (0 / 6) |
Uptime: | 96:24:12 |
Calls: | 290 |
Files: | 904 |
Messages: | 76,426 |
Howdy,
I downloaded some files. I have a few that have some weird names. Some
have those picture type characters. Some start with a dash, "-". In
some cases I can use wild cards to change them. Frank gave me some
ideas on that off list, while discussing his nifty checksum tool.
Anyway, I ran up on a few that start with a dash, "-", and I can't find
a way around that. The mv command thinks it is me trying to include a option. It spits out something like this.
mv: unrecognized option '---ne.avi'
Some of the other characters I run into look like this.
����
Those I can usually get around with wildcards. I have not found a way
to get around the ones with the dash in front tho. I tried a single
quote, double quote etc but still no worky. Also, tab completion
doesn't help either.
One reason I want to change these, it makes Frank's script puke on my keyboard. It reacts the same way with Franks script as it does when I
try to use cp or mv. Why someone would name files that way is beyond me.
What is the trick to rename these files? I've tried mv, Dolphin,
Krusader and such. There has to be a way but I can't figure out what it
is. Heck, I'm not even sure what to search for to find out how to do
this.
Thanks.
Dale
:-) :-)
Michael wrote:
In a terminal running bash you can try:
mv ./-ne.avi newname.avi
or use a double dash to indicate end of options for the preceding command:
mv -- -ne.avi newname.avi
For a GUI-fied application, you can use 'kde-misc/krename'.
Now that is awesome. The first one works great. Haven't had the need
to try others yet but figure they would work too. Finally, I can rename these files with weird characters. I never knew a -- meant end of
options before. Been using Linux for a couple decades and never saw
that info.
I saw that but never understood what it did. I thought it was
something that worked just with revdep-rebuild or something. So it
is a bash thing. Interesting. That could open a can of worms.
Howdy,
I downloaded some files. I have a few that have some weird names.
Some have those picture type characters. Some start with a dash,
"-". In some cases I can use wild cards to change them. Frank gave
me some ideas on that off list, while discussing his nifty checksum
tool. Anyway, I ran up on a few that start with a dash, "-", and I
can't find a way around that. The mv command thinks it is me trying
to include a option. It spits out something like this.
mv: unrecognized option '---ne.avi'
Some of the other characters I run into look like this.
����
Those I can usually get around with wildcards. I have not found a
way to get around the ones with the dash in front tho. I tried a
single quote, double quote etc but still no worky. Also, tab
completion doesn't help either.
Some of the other characters I run into look like this.
����
Howdy,[snip]
I downloaded some files. I have a few that have some weird names. Some have those picture type characters. Some start with a dash, "-". In
On 10/29/24 11:18 PM, Dale wrote:
Howdy,[snip]
I downloaded some files. I have a few that have some weird names. Some >> have those picture type characters. Some start with a dash, "-". In
Plenty of people have replied with good info. My 2c from when I
came across this exact problem is "vidir" contained in "moreutils".
Also, thumbs up for the tid-bit on "--" terminating the options string.
Andrew