How to remove unknown character from file name with terminal

Please post suggestions for improvement of Cinnamon on:
https://github.com/linuxmint/Cinnamon
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Kevin Tee

How to remove unknown character from file name with terminal

Post by Kevin Tee »

Hello, I am new to linux, I have been trying to copy .pdf from my pc to external hard disk. But I got an error, I found that this weird character is the problem. I have search around for solution but the problem is that I don't know what character is it thus cannot remove. I tried to copy this weird character but unable to paste it. I can manually delete them, but there are too many. Also this character is visible only when renaming the file but invisible when not. Thank you.

I'm using linux mint cinnamon 17.1
Selection_009.png

Sorry for my Engiish.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Buzzsaw
Level 6
Level 6
Posts: 1318
Joined: Sat Aug 23, 2014 12:53 pm

Re: How to remove unknown character from file name with term

Post by Buzzsaw »

Replace the unknown character with an asterisk.

For example, if I had a file called 'bad#file', and the '#' character were an unknown character, I would copy and rename it like this:

Code: Select all

cp /path/to/bad*file.pdf /path/to/destination/directory/good_file.pdf
If this doesn't work, here are some more complicated methods:
http://serverfault.com/questions/348482 ... -filenames
http://askubuntu.com/questions/25823/be ... -filenames
http://askubuntu.com/questions/65473/ho ... file-names
Kevin Tee

Re: How to remove unknown character from file name with term

Post by Kevin Tee »

Thank you Buzzsaw for reply, but I have already manually rename all of them. Thanks anyway.
Locked

Return to “Cinnamon”