Video Splitter Linux

broken image


  1. Video Splitter Linux Usb
  2. Free Video Splitter

OpenShot™ was created in 2008, in an effort to build a free, simple, open-source video editor for Linux. It is now available on Linux, Mac, and Windows, has been downloaded millions of times, and continues to grow as a project! Alternatives to Boilsoft Video Splitter for Windows, Mac, Linux, Web, iPhone and more. Filter by license to discover only free or Open Source alternatives. This list contains a total of 25 apps similar to Boilsoft Video Splitter. List updated: 5/29/2019 12:09:00 PM.

To help you learn about the split command I am using a relatively large text file containing 17170 lines and 1.4 MB in size. You can download a copy of this file from the GitHub link.

Note that I will not directly display output in these examples because of the large file sizes. I will use the ll and wc commands to highlight file changes.

I advise you to have a quick look at the wc command to understand the output of the split command examples.

Examples of Split command in Linux

This is the syntax of the Split command:

Let's see how to use it to split files in Linux.

1. Split files into multiple files

By default, split command creates new files for each 1000 lines. If no prefix is specified, it will use ‘x'. The letters that follow enumerate the files therefore xaa comes first, then xab, and so on.

Let's split the sample log file:

If you use the ls command, you can see multiple new files in your directory.

You can use wc to quickly check the line counts after splitting.

Remember from earlier that we saw our initial file had 17,170 lines. So we can see our program has done as expected by creating 18 new files. 17 of them are filled with 1000 lines each, and the last one has the remaining 170 lines.

Another way that we can demonstrate what is happening is to run the command with the verbose option. If you're unfamilar with verbose, you are missing out! It provides more detailed feedback about what your system is doing and it is available to use with many commands.

You can see what's going on with your command on the display:

2. Split files into multiple files with specific line numbers

Video Splitter Linux Usb

I understand that you might not like that files are split into files of 1000 lines. You can changes this behavior with -l option.

When this is added, you can now specify how many lines you want in each of the new files.

As you can guess, now the split files have 500 lines each, except the last one.

Now you have many more files, but with half as many lines in each one.

3. Split the files into n number of files

The -n option makes splitting into a designated number of pieces or chunks easy. You can assign how many files you want by adding an integer value after -n.

Now you can see that there are 15 new files.

4. Split files with custom name prefix

What if you want to use split but keep the original name of my file or make a new name altogether instead of using ‘x'?

You may remember seeing the prefix as part of the syntax described in the beginning of the article. You can write your own custom file name after the source file.

Here are the split files with names starting with the given prefix.

5. Split and Specify Suffix Length

Split features a default suffix length of 2 [aa, ab, etc.]. This will change automatically as the number of files increases, but if you would like to manually change it, that is possible too. So let's say you want our files to be named something like someSeparatedLogFiles.log_aaaab.

How can you do this? The option -a allows us to specify the length of the suffix.

And here are the split files:

6. Split with numeric order suffix

Up to this point, you have seen your files separated using different letter combinations. Personally, I find it much easier to distinguish files using numbers.

Let's keep the suffix length from the previous example, but change the alphabetical organization to numeric with the option -d.

So now you will have split files with numerical suffices.

7. Append hex suffixes to split files

Another option for suffix creation is to use in the built-in hex suffix which alternates ordered letters and numbers.

For this example, I will combine a few things I've already shown you. I will split the file using my own prefix. I chose an underscore for readability purposes.

I used the -x option to create a hex suffix. Then I split our file into 50 chunks and gave the suffix a length of 6.

And here is the outcome of the above command:

8. Split files into multiple files of specific size

It's also possible to use file size to break up files in split. Maybe you need to send a large file over a size-capped network as efficiently as possible. You can specify the exact size for your requirements.

The syntax can get a little tricky as we continue to add options. So, I will explain how the -b command works before showing the example.

Video Splitter Linux

When you want to create files of a specific size, use the -b option. You can then write nK[B], nM[B], nG[B] where n is the value of your file size and K [1024] is -kibi, M is -mebi, G is -gibi, and so on. KB [1000] is kilo, MB – mega etc.

It may look like there is a lot going on, but it's not that complex when you break it down. You have specified the source file, our destination filename prefix, a numeric suffix, and separation by file size of 128kB.

Here are the split files:

You can verify the result with the ‘wc' command.

9. Split files into multiple files of ‘At Most' size n with

If you wanted to split files into roughly the same size, but preserve the line structure, this might be the best choice for you. With -C, you can specify a maximum size. Then the program will automatically split the files based on complete lines.

You can see in the output that the first split file is of nearly 1MB in size where as the rest of the file is in the second file.

Free Video Splitter

Bonus Tip: Rejoining split files

This isn't a split command, but it might be helpful for new users.

You can use another command to rejoin those files and create a replica of our complete document. The cat command is short for concatenate which is just a fancy word that means 'join items together'. Since all of the files begin with the letter ‘x', the asterisk will apply the command to any files that begin with that letter.

As you can see, our recreated file is the same size as our original.

Our formatting (including the number of lines) is preserved in the file created.

If you're new to Linux, I hope this tutorial helped you in understanding the split command. If you are more experienced tell us your favorite way to use split in the comments below!

Beginner or experienced, I would suggest you also look at csplit command which is a slightly better way of splitting files in Linux command line.

Become a Member for FREE
Become a member to get the regular Linux newsletter (2-4 times a month) and access member-only content

Join the conversation.

Joyoshare VidiKit is a smart yet powerful video cutter and joiner that enables you to cut and merge video and audio files accurately with completely original quality. It also converts files to any popular format at a superfast speed, up to 60X.

What's better, the tools this professional video toolkit offers can efficiently help edit the videos in the way you desire. You're able to record screen, adjust brightness, contrast, saturation and hue, rotate by any 90 degrees or flip horizontally or vertically, add subtitles, embed watermarks, and even apply special sound video effects.

Supported OS:

Windows 10/8/7/Vista/XP; Mac OSX 10.8 - 10.15

Price:

$19.95 for 1 PC/month; $39.95 for 1 PC/year; $55.95 for 1 PC/lifetime





broken image