I guess it bears repeating. Bluntly this time.
If you're going to send a follow request, please do something with your Mastodon/Pleroma/Whatever profile. No activity on your instance account looks fishy. 🐟 I'm just going to cancel it outright if that's the case.
I know I'm not the only one on the Fediverse that feels this way.
@claudiom Just made my first toot. This is the second post. Thanks for following me back, Claudio. I was hoping to find OpenBSD users/dev here who actually use the platform. Glad to see you're looking for community engagement too. I got a tech question for you, if you don't mind. To prove I'm not a bot, I'll wait for your reply to this.
@learningopenbsd Welcome to the fediverse! 🐡 👍
Thanks!
So my question for you is this: How do I rename a file that has a corrupted filename? I downloaded a song and the filename got all jumbled with question marks, and mv doesn't seem to recognize what I'm trying to do when I attempt renaming it (tab-completion doesn't fill the rest off the name).
The file name is something like ???It???s Name of the song???.mp3
I read the mv man page and I'm not seeing a solution to this. I also read the rename man page but that's a little beyond my ability right now.
Any help is appreciated. Thank you.
@learningopenbsd Put that filename in between quotes.
@learningopenbsd The command should be as follows:
mv "???It???s Name of the song???.mp3" CorrectName.mp3
Is that what you tried?
Sorry for the delayed response. Yes, exactly, with the necessary \ at the end of the words, too.
I read a tutorial for mv (for Linux) somewhere that said to place \ before the ???s and that didn't work either.
So far I've tried:
1)
$ mv "???It???s Name of the song???.mp3" CorrectName.mp3
double quotation marks
2)
$ mv '???It???s Name of the song???.mp3' CorrectName.mp3
single quotation marks
3) $ mv \???It???s\ Name\ of\ the\ song???.mp3 CorrectName.mp3
with backslash
3)
$ mv "\???It???s\ Name\ of\ the\ song???.mp3 CorrectName.mp3
double quotation marks with backslashes
4) mv '\???It???s\ Name\ of\ the\ song???.mp3' CorrectName.mp3
single quotation marks with backslashes
Example number 3 in real-world use had the ending quotation mark. I accidentally didn't type it in in that last toot.
3 properly reads (i double checked my terminal history to confirm I typed):
$ mv ""\???It???s\ Name\ of\ the\ song???.mp3" CorrectName.mp3
It still doesn't work.
I'm going crazy here.
@learningopenbsd OK, try this workaround. Install bash and then do it with the quotes. Ksh can be funky sometimes with things like that. You can delete bash once you're done with it.
Thanks for your help, Claudio. I hope I to one day know how to help others and be as willing to help them as you have been willing to help me today.
Thanks and God bless.
@claudiom
bash-5.0$ doas mv "???It???s Name of the song???.mp3" CorrectName.mp3: No such file or directory
I think the wildcards are somehow preventing the system from (even Bash) from knowing it's there.
I'm just gonna delete it and redownload.