Compressing / splitting files in Android (also works in Linux) using built in tools

Posted: March 28, 2016 in Android, Linux

Android phones may already have a terminal emulator app installed by default (otherwise install a terminal emulator app from the Google Play store) then do the following;

tar czvf - inputfilename |split -b 5M - outputfilename.tar.gz.

Resulting filenames will be outputfilename.tar.gz.aa, outputfilename.tar.gz.ab, outputfilename.tar.gz.ac etc.

inputfilename can be a file or folder, 5M in above example splits files into 5MB sizes.

To extract/recombine;

cat outputfilename* |tar xzvf -

Credits to StackExchange

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s