linux stack overflow

  • mv大量文件报错mv: Argument list too long
    stack overflow
    Question:

    If I run the command mv folder2/*.* folder, I get "argument list too long" error.
    find folder2 -name '*.*' -exec mv {} folder ;
    -exec runs any command,  {} inserts the filename found, ; marks the end of the exec command.
    

    Answer:

    find folder2 -name '*.*' -exec mv {} folder ;
    -exec runs any command,  {} inserts the filename found, ; marks the end of the exec command.