You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To split a file large then a certain threshold, a simple shell script serve well. It event works on Android. Assume that we want to split all the files larger than 20 M in current directory.
find . -type f -size +20M -exec sh -c 'split -b 20M "$0" "${0%.*}_"; rm "$0"' {} \;
find . : find files in current directory
-type f: only show the file type == file (there could be directories, socket, etc)
size +20M: larger than 20 M
-exec sh -c .... {} \;: once matched file > 20M, the file name is passed as {} to -exec
'split -b 20M "$0" "${0%.*}_"; rm "$0"': split file size > 20M bytes, output filename foo to foo_a[a-z], and after splitting, remove the original file.
The text was updated successfully, but these errors were encountered: