I have some dirname with '?????' characters, can't determine codeset, using convmv, So I tried to do following
find . -maxdepth 1 -type d > list
edit list with cutting others that ./????...
mv `cat list` new_dir
But it won't work, may I ask why, and how to rename this dir?
The ouput of cat list
gets embedded inside the mv
command line, and it confuses the shell.
To fix, the output should be encapsulated inside double quotes, which is achieved like this:
mv "`cat list`" new_dir