Forked from prithv1/gist:83655754abc13ed80e06bfcc662177c9
Created
January 17, 2023 11:17
-
-
Save alex2844/27e24cc2672bbbe0cf53bcc47daa57b7 to your computer and use it in GitHub Desktop.
/bin/tar: Argument list too long
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@url https://major.io/2007/07/05/bintar-argument-list-too-long/ | |
If you find yourself stuck with over 30,000 files in a directory (text files in this example), packing them into a tar file can be tricky. You can get around it with this: | |
find . -name '*.txt' -print >/tmp/test.manifest | |
tar -cvzf textfiles.tar.gz --files-from /tmp/test.manifest | |
find . -name '*.txt' | xargs rm -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment