Command to truncate all filenames at 255 characters
问题 An NTFS directory is open in a bash shell. what command will recursively truncate all filenames in a directory to the 255 character limit required for ext3? 回答1: If you have access to a Windows shell, you can use: @echo off setlocal EnableDelayedExpansion REM loop over all files in the cwd for /f %%a in ('dir /a-d /b') do ( REM store this filename in a variable so we can do substringing set ThisFileName=%%a REM now take a substring set ThisShortFileName=!ThisFileName:~0,255! REM finally, the