I am used to raring files -- but I am looking for something faster. I see that there is a "split" command. How does this command compare to rar? What is are the differences between split and rar?
2 Answers
split is a traditional UNIX tool, that does one job only—splitting files. If you had a bunch of files to archive to individual disks, you might do it like this:
____________________ | FILESYSTEM | _________ ____________ | dir1/ dir2/ | tar | | gzip | | | file1 file3 | -------------->| ARCHIVE |------------>| COMPRESSED | | file2 file4 | |_________| | ARCHIVE | |____________________| | | |____________| | | s | p | l | i | t | +----------------+----------------+------------------+ | | | \|/ \|/ \|/ ____________ ____________ ____________ | | | | | | | COMPRESSED | | COMPRESSED | | COMPRESSED | | ARCHIVE | | ARCHIVE | | ARCHIVE | . . . | DISK 1 | | DISK 2 | | DISK 3 | |____________| |____________| |____________| You use tar to combine a bunch of files into one archive; you use gzip to make that archive smaller by compressing it; and you finally use split to cut that compressed archive into chunks that fit on your disks. The advantage here is that you can easily switch out parts—say, you could use bzip2 or xz to compress your archive. Or cpio to make your archive.
rar (and also zip) come from the DOS/Windows world, where you don't normally chain together tools. So, they actually combine an archiver (like tar), a compressor (like gzip), and a file splitter (like split) into one tool. The advantage is that they can three parts have more knowledge of the other—say, you could avoid splitting a single file across disks (which is near impossible with the distinct programs).
split splits files, the size remains the same. rar reduces the size.
- Well, it reduces the size, unless the file is already compressed like in a mp3 or movie. - In this case it is perfectly valid to use split, as it will be faster and produce (slighly) smaller files.michas– michas2013-11-26 17:36:56 +00:00Commented Nov 26, 2013 at 17:36
- Rar is a compressions tool similar to zip and 7z.2013-11-26 18:07:15 +00:00Commented Nov 26, 2013 at 18:07
man splitandman rar. One splits a file into pieces, the other compresses it. They have nothing to do with each other. This is like asking what's the difference between a cow and a mouse. They're both mammals but apart from that...man splitandman rarwould have done the same. The OP now has an answer so there is no reason to keep this Q since it is so unlikely to ever help anyone else. Whatever combination of misunderstandings led to this question are not likely to occur again.