Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [split]

The tag has no usage guidance.

0
votes
2answers
16 views

split output into multiple files after reaching a certain size with correct file-extension

I use make | tee >(split -d -b 10000000 - debug.log.0) to split the output into several debug files after reaching 10MB. this results in files called debug.log.000, debug.log.001, debug.log....
0
votes
1answer
24 views

Split a text file with customize name and size

I use Debian and I have a text file and I want to split that into several files with specific suffix name and size. I want split that file by n chunk therefore, I should use -n option. How can I do ...
0
votes
2answers
29 views

how to rename output of split command to match the first word in each line?

I have input.txt file (with 4 lines)like this: GGTAACC_MIR4095P USP7 MKRN1 TSHZ3 EIF2C1 SRSF8 CAMK2G ARID4B GCM_TINF2 MORF4L1 ABHD16A ZNF274 C7orf43 SNX33 chr9q34 ...
0
votes
0answers
31 views

SOX split audio in noise between the sentences

How do I split audio files in SOX? RMS Speech level = -30dB RMS Noise in and between the sentence = -40 - -45dB I have tried to use various example of "Split audio on silence but keep silence" by ...
0
votes
1answer
37 views

Split Tmux window simulating vim's nosplitbelow and nosplitright behaviour

Tmux has normal keybindings to split terminals horizontally and vertically. But it splits right and below the currently active pane. Is there a way to split the currently active pane so that the new ...
1
vote
1answer
150 views

Split audio stream with sox and process chunks with script

I use sox for splitting audio stream like this stream | sox -t raw -r 16k -e signed -b 16 -c 1 - ./chunks/output.wav silence 1 0.3 0.1% 1 0.3 0.1% trim 0 55 : newfile : restart Now sox write chunks ...
2
votes
2answers
224 views

Split file in different records using a loop and give the files new names

I have a large files (800.000 records) and I want to split this into different files of 20.000 records each. This one I can do, but my next problem is that I want to know if it's possible to ...
1
vote
2answers
209 views

How to split files with numeric names?

I'm trying to split text file into files of 1024 lines, so I ran split with the -d switch: split -d -l 300 ./list.lst I get some weird names: they start with x and the file names jump from x89 to ...
3
votes
2answers
715 views

How to split a large folder into smaller folders of equal size [closed]

I have one big folder with many file types in it (e.g .txt, .sh). It's about 40Gb. I would like to split it into four parts of 10Gb each. How can I achieve this?
1
vote
1answer
104 views

Rsync - Splitt Folder / Subfolder structure

I use openmediavault (OMV is a NAS software from openmediavault.org) and have different shares defined. In one of the shares I have a folder structure like this: (examples) Subfolder"ABC"/...
2
votes
3answers
48 views

Split content of specific columns when specific characters are present in those columns

I have this data tab delimited: ed00011 89 0.12 NA NA No ed0002s 28 0.11 c3(3.1e-1) NA No ed0001 22 0.37 NA ...
2
votes
4answers
356 views

Split and concatenate (create command line arguments from input file)

How to concatenate text from file of lines in format: line1 line2 ... to get results like -o line1:1 -o line2:1 ... I found solution how to concatenate with a separator like this: ds=`cat list....
0
votes
3answers
220 views

How to split a file into paragraphs and name the resulting pieces based on an identifier present in each paragraph

I have a big file with more than 3264880 lines. I wanted to split that file based on Two strings "BEGIN JOB" and " END JOB" and write it into multiple files and the file name should be based on a ...
-1
votes
2answers
122 views

How to save a number from a text file in python? [closed]

I have a text file, from which I have to extract a number, which is in the line called "width:" It is like: width: 3432 Now I am trying: import re file = ...
-1
votes
1answer
37 views

how to get te 2. element of the 11. line with python? [closed]

I have a text file, and I want to save the second elemnt od the 11th lines as an element. The file looks like this: WIDTH: 32554 I am trying to get it with this: z = open('abcd.txt') lines = z....
0
votes
1answer
329 views

Splitting up a pcm file into minute using ffmpeg long chunks

I have a large pcm file with about an hour's worth of data. I want to split it up into minute long chunks. Is there a way to ffmpeg to do that pr some other utility? Basically going from 0 - 3600s I ...
9
votes
1answer
774 views

Uncompressed file estimation wrong?

I had a large (~60G) compressed file (tar.gz). I used split to break it into 4 parts and then cat to join them back together. However, now, when I am trying to estimate the size of the uncompressed ...
1
vote
1answer
336 views

putting standby node online results in drbd split brain

I have 2 node cluster on pacemaker/corosync running on scientific linux 6. drbd is running on both nodes master=node1 slave=node2. When i put the slave node2 on standby and then back online everything ...
0
votes
2answers
90 views

Split datetime column in csv file into MM/YYYY and time column separately and write to the same csv

I am trying to use awk, split and then print but running into error Input: id day userId itemId 1 12/1/17 8:32 2232 tv 2 1/12/18 10:18 3232 fdfs 3 2/9/18 10:50 232 fdsf ...
0
votes
1answer
23 views

How to process series of files once transfer complete

What I have I have 2 servers. Lets call them sen.der and recei.ver. Sender generates files; these files can range in size from a 20Kb to 30 Gb. I've written a script that checks to see how big the ...
-1
votes
1answer
42 views

Line based chunking by size? [duplicate]

Github restricts file uploads to 100mb. This is unfortunate for public data. I know I can split binary files with dd. What I would like to do is split them all into 99MB files but here's the catch, I ...
1
vote
1answer
69 views

divide file into equal counts [duplicate]

I have one .txt file which has more than 1 million record inside. (rownum from 1 to 1 million) I need to divide this file into two 500k files in linux. (file1 = rownum from 1 to 500k and file2 = ...
1
vote
0answers
68 views

Daily Log Files from Single Log File [duplicate]

I want to split my user.log file which is always in open mode as logs are written every time. I want to split it into daily log files i.e. userlogs_29072018 and the main user.log file should have data ...
3
votes
1answer
385 views

Use Variable Date in Sed Command

I want to use sed command as below: $ sed -n '/MONTH_TODAY DATE_YEST/,/MONTH_TODAY DATE_TODAY/p' \ /home/crmiib/TESTUSERLOG/XYZ/user.log I can print logs using: $ sed -n '/Jul 27/,/Jul 28/p' /...
-3
votes
1answer
382 views

Split text file into smaller chunks

I have a text file containing a list of strings. The strings are separated by newlines and have the same length, 8-digit. I need to split larger file into smaller chunks, where each chunk contains 4 ...
0
votes
0answers
13 views

How to fix incompatibly joined mp3 file (mono - stereo tracks were merged together)?

I have joined a couple of audio books, which were originally splitted in several parts, and were recorded from different radio stations. Earlier I made an mp3 joiner script, which uses ffmpeg and ...
0
votes
2answers
344 views

Split into file with first column Name

I have this CSV file: "Product ID";"Product Name";"Price";"Description"; "11;"Example";"200";"Descripcion here..."; "21;"Example2";"300";"Some here..."; I want to split it line by line and save them ...
0
votes
3answers
72 views

Spliting a big file in to multiple?

I have a big file run_simulation.csh of about 1000 line #!/bin/csh ...
2
votes
8answers
465 views

Extract rows using a delimiter and append as column in a file

I have a file that contains data something like: a 1 b 2 c,d,e 3,4,5 f 6 g,h 7,8 ... and I need the output like: a 1 b 2 c 3 d 4 e 5 f 6 g 7 h 8 I can do this using python, but I want to try this ...
0
votes
1answer
283 views

Need to split a file into multiple files, but ensure the grouped data remains in same file [duplicate]

This question is not a duplicate, because here we need also to ensure, that group of common values/rows remain in the same split file (and is not scattered across multiple split files). All, I tried ...
0
votes
9answers
114 views

split a line into many part base on curly brace ?

I have a 1-line file which has a format of: {port1 dev1 M1 s} {port1 dev1 M1 s} {port3 dev2 M1 g} {port1 dev1 M1 d} {port1 dev1 M3 g} ... I want to split this line and cat to output file base on ...
0
votes
2answers
313 views

Splitting a single large PDF file into n PDF files based on content and rename each splitted file (in Bash)

I'm working in a method of splitting a single large PDF file (which represents monthly settlements of a credit card). It is builded for printing but we'd like to split that file into single ones, for ...
0
votes
2answers
79 views

Split file into 4 chunks using macOS version of split package

In GNU/Linux in order to split file into 4 equal chunks we can do something like: split temp -n 4 PREFIX_ But seems like the macOS' BSD version of split utility doesn't have -n option. What would be ...
0
votes
1answer
109 views

split file based on the first digit in the line

I have a file which is about 10 gigs and therefore can not be process it in my beloved excel. I need to cut this file in multiple parts based on the first number. For example the file looks something ...
-2
votes
3answers
99 views

Scripting, with split [closed]

How can I write a shell script that will split only PDF files in my directory that are larger than 1,000KB? Without using pdftk or any other downloadable tools ...
1
vote
3answers
71 views

Insert lines from an input file every n lines in awk

With input files A and B as such: File A 1 1 1 2 2 2 3 3 3 File B 10 10 10 20 20 20 30 30 30 40 40 40 50 50 50 60 60 60 70 70 70 I would like to insert one line of file A every 3 lines of file B,...
3
votes
2answers
8k views

Split single line into multiple lines, Newline character missing for all the lines in input file [duplicate]

I there a way to split single line into multiple lines with 3 columns. New line characters are missing at the end of all the lines in the file. I tried using awk, but it is splitting each column as ...
1
vote
1answer
261 views

why does gzip not create files of equal size?

I have a file I need to split into smaller sizes (<24M when zipped) Heres the file: 498775505 Mar 8 00:08 test.file I split it: split -b 125000k test.file test.file. Now I have even sized ...
2
votes
1answer
867 views

How to do multiple splits of a csv file based on unique column values?

I have a csv file which has multiple columns. Here is an example of what i'm stuck with. Below is sample input data: 9,-54,18205,28,0,1517400128,2353,0,0,0,0,551 9,-54,18207,28,0,1517400128,2354,0,0,...
1
vote
1answer
357 views

What is the difference between split -C and split -b?

According to the man page: -b, --bytes=SIZE put SIZE bytes per output file -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file So if -b already splits a file by bytes per file, ...
0
votes
1answer
1k views

How to split a single file into multiple files based on a column in linux?

I have a text file with following information: Hugo_Symbol Tumor_Sample_Barcode Entrez_Gene_Id Center NCBI_Build MTHFR TCGA-BD-A2L6-01A-11D-A20W-10 4524 BCM GRCh38 SLC30A1 TCGA-BD-A2L6-...
0
votes
1answer
278 views

Split Large files based on line number, run it and then append the final output into one file

I am using an R package. The input files required to run in the the package are large(as big as 65 Gb of size) So I have decided to split the file in chunks based on line number and then merge the ...
1
vote
1answer
471 views

How to split a file to multiple files with multiple threads?

So I have a 100GB text files And I want to split it into 10000 files. I used to do such tasks with something like: split -l <number of lines> -d --additional-suffix=.txt bigfile ...
6
votes
6answers
1k views

split file into N pieces with same name but different target directories

I want to split sourcefile.txt which contains 10000 lines, (increasing everyday) into 30 equal files. I have directories called prog1 to prog30 and I would like to save split the file into these ...
2
votes
2answers
70 views

bash script: a more elegant way to perform these operations:

I have these three files: file.txt.7z = 5.4GB file-1.txt.7z = 251M file-2.txt.7z = 7.7M And they are the only files in a directory: $ tree . ├── file.txt.7z ├── file-1.txt.7z └── file-2.txt.7z I ...
0
votes
1answer
137 views

How to extract content from a single file by using two specified points with dd?

Taking from here, there is a steganography part in an image file called moon.png. It led me thinking, how would I extract a say Zlib that is between 944 and 411781 using something like dd. $> ...
0
votes
1answer
857 views

cat and split a file and upload to hdfs?

I am trying to achieve this scenario where I can split a gz file which is on local linux and upload to hdfs as part unzipped or zipped files without writing the split output to disk. I am having ...
2
votes
4answers
288 views

Printing every N columns in new file

How to print every 100 columns of a file with 1000 columns in 10 different files? split command is use to split rows into different files. I am looking for columns in different files.
1
vote
1answer
946 views

splitting a file to smaller files with numeric suffix

I have a file with 20000 lines and I want to split it into smaller files with a numeric suffix, each with 2 lines. So, very simply I am using split -l 2 -d my_file my_file_new The output files with ...
0
votes
4answers
2k views

Split file based on a date field

I have a file abc.txt. I need to grep the file on the date field which is present at 4th position in the text file. I need to split the file based on the date from 1st to 15th August the data need to ...