This question already has an answer here:
I have some podcasts on my radio server which contain a timestamp when they should be played. I noticed one of them is put into single quotes
'filename.mp3', and I'm unable to remove them. Check this:
4,0K drwxr-xr-x 2 user group 4,0K 4. Apr 20:40 . 4,0K drwxrwsr-x 6 user group 4,0K 4. Apr 20:28 .. 83M -rw-r--r-- 1 user group 83M 4. Apr 20:32 2016-03-09-22-00-moshtrocity.mp3 173M -rw-r--r-- 1 user group 173M 4. Apr 20:40 2016-03-25-10-00-funkfabrik-classic-25.mp3 53M -rw-r--r-- 1 user group 53M 4. Apr 20:41 '2016-04-01-21-00-Wasted Fridays.mp3'
Now, I tried to escape the
\' like that, but I get:
$ mv \'2016-04-01-21-00-Wasted\ Fridays.mp3\' 2016-04-01-21-00-Wasted\ Fridays.mp3 mv: cannot stat ''\''2016-04-01-21-00-Wasted Fridays.mp3'\''': No such file or directory
Now, it looks like it ignores the quotes. I tried without, look at this:
$ mv 2016-04-01-21-00-Wasted\ Fridays.mp3 2016-04-01-21-00-Wasted\ Fridays.mp3 mv: '2016-04-01-21-00-Wasted Fridays.mp3' and '2016-04-01-21-00-Wasted Fridays.mp3' are the same file
Uh, how to deal with that? How to remove a single quote from a file name?
I'm on ArchLinux if this matters. Filesystem is ext4.