MV 命令行不适用于某些文件 (OSX)
MV command line not working for certain files (OSX)
我下载了一堆 youtube 视频和文字记录,我正在尝试使用作为文件标题一部分的 11 个字符的 youtube ID 重命名它们。我创建了一个文本文件,其中每一行都有旧标题和新标题,并由字符“>
”
分隔
我正在使用以下命令:
parallel -j 4 --colsep '>' mv "{1}" folder/{2} :::: rename.txt
这仅适用于 90% 的文件。 10% 的文件留下错误。我在下面附加了一些不起作用的文件名。我怀疑有些角色对 mv 不友好,但我被卡住了。
'Design at Large - Scaling the Studio and the Lab to the Globe' _ Scott Klemmer _ TEDxUCSD-HcMsp0wVH5Q.en.vtt
'Do yourself a favour - DONATE BLOOD' _ Meenakshi Lekhi _ TEDxDITE _ Mrs. Meenakshi Lekhi _ TEDxDITE-Sq3x7HYM3UQ.en.vtt
'I am cool with myself' - Serah. G. at TEDxInhaU-SUZ5hCqws6U.en.vtt
'Play Dead' (Björk), _ Corisco & Costellas Madera de mar _ TEDxCadizUniversity-OpbzqHN7FOU.en.vtt
'Species on the Move' _ Chad Jones _ TEDxConnecticutCollege-sqTZ5MXxm4c.en.vtt
'The Art of Being Wrong' _ Kim Schlesinger _ TEDxWartburgCollege-Kzv-lMv4qRY.en.vtt
'There's a better way to do it. Find it' _ John Keegan _ TEDxNJIT-Vrw5brX1Wfo.en.vtt
(Please), Don’t let us go extinct _ Samantha Matheijsen _ TEDxAvansUniversity-QAPId_JNcjw.en.vtt
(Pre)Human 3.0 _ Luc Deleuze _ TEDxUNamur-E7N5__flfkY.en.vtt
12x16 - The Messy Process of Unlearning _ Dominic Inouye _ TEDxUWMilwaukee-Ql7y19kBojY.en.vtt
2017's Mind-Blowing Drone Innovations _ Donna Chiu _ TEDxHKUST-T8jg5YS8hZ0.en.vtt
21st Century Education - The Science of Understanding _ Tom Koch _ TEDxGettysburgCollege-TAOKCxl71g0.en.vtt
3 Most Important Ingredients For making Perfect Success Recipe _ Bhupendra Rathore _ TEDxBalajiITS-_k65z2WEUqA.en.vtt
3 counter-intuitive ways to achieve anything you want _ David LAROCHE _ TEDxKedgeBS-aad7N-qJE40.en.vtt
3 reasons why we should share our stories with the world _ Praveen Wadalkar _ TEDxKhulnaUniversity-YtEa0mirjHo.en.vtt
320 Cakes - The Existential Escapade _ Natalie Rowland _ TEDxWilliam&Mary-1oEpR3UPLz8.en.vtt
5 Ways to Run a Great Blog _ Kimberly D'Souza & Denver Britto _ TEDxBITSPilaniDubai-UogiOStY-Ps.en.vtt
63 Days of Superstition _ Tanushri Sundar _ TEDxBrownU-Lgmu84-Pxv4.en.vtt
8 + 8 + 8 - Time Management _ Gyanvatsal Swami _ TEDxMSUniversityofBaroda-MmlEQwdqlfo.en.vtt
A PATHWAY TO HEALTHY SOCIETIES _ Rameshwar Nath Kaul Bamezai _ TEDxJECRC-LoYFgaF0PXM.en.vtt
你介意帮帮我吗?
谢谢!
您遇到的问题是 shell(或平行工具)正在解释特殊字符。
要移动这些文件,您需要对文件的某些部分进行转义(添加反斜杠: )。下面是几个例子:
mv \'The\ Art\ of\ Being\ Wrong\'\ \ _\ Kim\ Schlesinger\ _\ TEDxWartburgCollege-Kzv-lMv4qRY.en.vtt folder/
mv Play\ Dead\'\ \(Björk\)\,\ \ _\ Corisco\ \&\ Costellas\ Madera\ de\ mar\ _\ TEDxCadizUniversity-OpbzqHN7FOU.en.vtt folder/
mv 320\ Cakes\ -\ The\ Existential\ Escapade\ \ _\ Natalie\ Rowland\ _\ TEDxWilliam\&Mary-1oEpR3UPLz8.en.vtt folder/
等等
有关详细信息,请参阅 Escaping Filenames and Explaining what needs to be escaped
- 始终使用
--
标记处理路径或文件名的命令的选项结束,以防止 file-names 或模式通配符被解释为选项。
- 始终对包含变量的字符串使用 double-quotes,以防止变量内容在 space 上被拆分或解释特殊字符。
parallel -j 4 --colsep '>' mv -- {1} folder/{2} :::: rename.txt
我下载了一堆 youtube 视频和文字记录,我正在尝试使用作为文件标题一部分的 11 个字符的 youtube ID 重命名它们。我创建了一个文本文件,其中每一行都有旧标题和新标题,并由字符“>
”
我正在使用以下命令:
parallel -j 4 --colsep '>' mv "{1}" folder/{2} :::: rename.txt
这仅适用于 90% 的文件。 10% 的文件留下错误。我在下面附加了一些不起作用的文件名。我怀疑有些角色对 mv 不友好,但我被卡住了。
'Design at Large - Scaling the Studio and the Lab to the Globe' _ Scott Klemmer _ TEDxUCSD-HcMsp0wVH5Q.en.vtt
'Do yourself a favour - DONATE BLOOD' _ Meenakshi Lekhi _ TEDxDITE _ Mrs. Meenakshi Lekhi _ TEDxDITE-Sq3x7HYM3UQ.en.vtt
'I am cool with myself' - Serah. G. at TEDxInhaU-SUZ5hCqws6U.en.vtt
'Play Dead' (Björk), _ Corisco & Costellas Madera de mar _ TEDxCadizUniversity-OpbzqHN7FOU.en.vtt
'Species on the Move' _ Chad Jones _ TEDxConnecticutCollege-sqTZ5MXxm4c.en.vtt
'The Art of Being Wrong' _ Kim Schlesinger _ TEDxWartburgCollege-Kzv-lMv4qRY.en.vtt
'There's a better way to do it. Find it' _ John Keegan _ TEDxNJIT-Vrw5brX1Wfo.en.vtt
(Please), Don’t let us go extinct _ Samantha Matheijsen _ TEDxAvansUniversity-QAPId_JNcjw.en.vtt
(Pre)Human 3.0 _ Luc Deleuze _ TEDxUNamur-E7N5__flfkY.en.vtt
12x16 - The Messy Process of Unlearning _ Dominic Inouye _ TEDxUWMilwaukee-Ql7y19kBojY.en.vtt
2017's Mind-Blowing Drone Innovations _ Donna Chiu _ TEDxHKUST-T8jg5YS8hZ0.en.vtt
21st Century Education - The Science of Understanding _ Tom Koch _ TEDxGettysburgCollege-TAOKCxl71g0.en.vtt
3 Most Important Ingredients For making Perfect Success Recipe _ Bhupendra Rathore _ TEDxBalajiITS-_k65z2WEUqA.en.vtt
3 counter-intuitive ways to achieve anything you want _ David LAROCHE _ TEDxKedgeBS-aad7N-qJE40.en.vtt
3 reasons why we should share our stories with the world _ Praveen Wadalkar _ TEDxKhulnaUniversity-YtEa0mirjHo.en.vtt
320 Cakes - The Existential Escapade _ Natalie Rowland _ TEDxWilliam&Mary-1oEpR3UPLz8.en.vtt
5 Ways to Run a Great Blog _ Kimberly D'Souza & Denver Britto _ TEDxBITSPilaniDubai-UogiOStY-Ps.en.vtt
63 Days of Superstition _ Tanushri Sundar _ TEDxBrownU-Lgmu84-Pxv4.en.vtt
8 + 8 + 8 - Time Management _ Gyanvatsal Swami _ TEDxMSUniversityofBaroda-MmlEQwdqlfo.en.vtt
A PATHWAY TO HEALTHY SOCIETIES _ Rameshwar Nath Kaul Bamezai _ TEDxJECRC-LoYFgaF0PXM.en.vtt
你介意帮帮我吗? 谢谢!
您遇到的问题是 shell(或平行工具)正在解释特殊字符。
要移动这些文件,您需要对文件的某些部分进行转义(添加反斜杠: )。下面是几个例子:
mv \'The\ Art\ of\ Being\ Wrong\'\ \ _\ Kim\ Schlesinger\ _\ TEDxWartburgCollege-Kzv-lMv4qRY.en.vtt folder/
mv Play\ Dead\'\ \(Björk\)\,\ \ _\ Corisco\ \&\ Costellas\ Madera\ de\ mar\ _\ TEDxCadizUniversity-OpbzqHN7FOU.en.vtt folder/
mv 320\ Cakes\ -\ The\ Existential\ Escapade\ \ _\ Natalie\ Rowland\ _\ TEDxWilliam\&Mary-1oEpR3UPLz8.en.vtt folder/
等等
有关详细信息,请参阅 Escaping Filenames and Explaining what needs to be escaped
- 始终使用
--
标记处理路径或文件名的命令的选项结束,以防止 file-names 或模式通配符被解释为选项。 - 始终对包含变量的字符串使用 double-quotes,以防止变量内容在 space 上被拆分或解释特殊字符。
parallel -j 4 --colsep '>' mv -- {1} folder/{2} :::: rename.txt