Questions tagged [split]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
168 views

Split large files into a number of files in unix

i have a file that contains several lines(9074 line), i want to split the file into 10 files contain the same number of lines except the last file that contain the remainder number of lines split -l `...
-1
votes
1answer
55 views

linux + how to split ISO file to separate pieces [duplicate]

we are using the following ISO file for rhel upgrade 4.2G RHEL-7.6.iso since we have problem to copy this ISO file between WIN to Linux machine and that because sometime network problem cause ISO ...
2
votes
2answers
41 views

Split long SQL expression at delimiter

Context I'm trying to import a dump that have some long lines (8k+ character) with SQL*Plus, so I face the error SP2-0027: Input is too long (> 2499 characters). This is a hard-coded limit and ...
0
votes
1answer
18 views

How to split single rows of a CSV file into multiple depending on delimiter in 2nd column

My base.csv file has several entries a sample of which is below. NAME,IP_ADDRESS,PRI_IP,APP_CODE,APP_NAME,OWNER test2,10.9.7.12/10.222.101.11,10.9.9.12,545,myapp1,owner1 mytest,10.9.7.12,10.9.9.12,545,...
2
votes
1answer
30 views

Piped split command not executing

Rather straightforward question that I'm stumped on. I have a command line utility called twarc that I am executing. This can build rather large files. I would like to leave this running and ...
6
votes
2answers
185 views

awk: split file by column name and add header row to each file

I have a pipe delimited file a.txt which includes a header row. The first column holds a filename. I would like to split a.txt into several different files - the name of which is determined by the ...
1
vote
1answer
43 views

Opening multiple screens in a linux terminal using a script or command

I want to open screens vertically and horizontally. I have used the following: tmux ctrl + b then % ctrl + b then " screen ctrl + a then S ctrl + a then | But, is it possible to open a screen ...
0
votes
0answers
17 views

Using pipe operator to send gsplit command to specific folder

gsplit -a 5 -b 4294967295 -d --numeric-suffixes=66600 "thisfile.avi" "thisfile.avi." | not sure what to do here I want to get the splif files into a new directory same where the ...
0
votes
0answers
113 views

Split csv file on multiple csv files based on several columns headers

I have a large csv file that i tried to split into several csv files based on certain columns in the header. The objective is to generate each file in relation to the columns of the country. For ...
-1
votes
2answers
136 views

How do i split my tar.gz into multiple files in a single exec command? [duplicate]

I don't know anything about Unix/Linux. I am primarily a web programmer. I am running the following command in my code: exec("tar -caf '/backups/_structure.tar.gz' --ignore-failed-read -C /source ...
2
votes
2answers
232 views

How to split text files by character count in directory

I would like to divide multiple text files in a directory into many smaller text files by a given character count. For example, I want each file in the directory to be divided into smaller text files ...
2
votes
3answers
159 views

Using regex with IFS variable to split Bash string

I am trying to split a string into an array by any character that is not alphanumeric. Can assign a regex pattern to the IFS variable to accomplish this? I have tried it like so: input="$1" ...
0
votes
2answers
33 views

split output into 2 columns based on number of rows

I have the following output: Column1 1.2.3.1 1.2.3.2 1.2.3.3 1.2.3.4 1.2.3.5 1.2.3.6 Column2 1.2.3.7 1.2.3.8 1.2.3.9 I would like to split into 2 columns once it reaches Column2. For example: ...
2
votes
2answers
154 views

Awk - Split each byte to their own file while specifying created filename to stdout

I have huge files (multiple gigabytes, etc) and while i tried many different tools (split, etc) but for my own needs i need to do this in awk. Basically, i want to emulate what split -b 1 file does (...
1
vote
2answers
188 views

How can I batch rename text files to be the first word in each text file?

I need to rename a few thousand text files to be the first word in the text file plus the file extension (.txt) using the terminal. All the files are in a single directory, and are currently named int ...
1
vote
1answer
64 views

How can I split command stdout into sections, one for each file?

When a Linux command gets multiple files as input. Is there any command/trick to split command's stdout into sections. One for each file? So, it becomes visually clear which lines belong to which file?...
1
vote
1answer
74 views

How to divide a file to different subdirectories

I have a file that contains a story. I need to split the file in a way that each chapter (chapter starts with the word 'chapter') will be in diffrent directory. CHAPTER count as- everything that ...
0
votes
1answer
81 views

Split file based on beginning and end XML tag

Can split be used to split a file into multiple segments where the size of each segment is based on the number of matches of an XML element ? For example for below XML split when encounters of "<...
0
votes
3answers
62 views

Split a string by multiple delimeters in bash

There's a string: onetwothree.file.001.txt ; threefourfive.file.0.98.txt ; fivefoursix.file.14.txt I want to split it by . and ; removing the prefix before the filename, so that it looks like this: ...
-1
votes
1answer
118 views

what is the best approach to Join Tar files after Splitting [closed]

we have the following files , that we split from huge tar file linuxaa linuxab linuxac . . . note - we have only files with linux[a-b][a-z] and linux-xxxx or linux_xxx , but we want to compress ...
1
vote
0answers
57 views

How can I concatenate thousands of files into a single device

I'am using split to cut a an iso into multiples chunks. Then a can use cat to rebuild initial iso that I can convert into a mountable device with losetup and then mount. The problem is when initial ...
0
votes
0answers
37 views

Split a file into 8 files depending on the number of records

I have a file with 10K records and I need to divide it into 8 files. I used split -n l/8 -d file1 file2. This will split the file into 8 files, but I need to divide the file into 8 depending on the ...
1
vote
2answers
306 views

Split text separated by lines starting with semicolon

I have the output from a command (plantuml -language; see List of keywords, predefined names, symbols for codeless language module for BBEdit? for the background) which effectively looks like this: ;...
0
votes
2answers
86 views

Script in Bash: Find all files

I want to write a script in Bash which finds all files less than 100b in /etc directory, splits the results on pages and saves the results to a file. I tried to use this command: find /etc -size -...
0
votes
0answers
94 views

Sox split .mp3 wav by silence

mp3 file with around 200 sentences. They are separated by silence of around 500-1000, but it is not fixed or equal. What is the best way to split to one file per sentence? Preferably with sox. I ...
1
vote
0answers
39 views

Split the large file and group the split files into sub directories

In a Directory, Find the files having size greater than 5GB and split them as 2GB files each, then group the slit files of 5 files into separate directories. If I have a file with 20GB in my current ...
0
votes
2answers
46 views

Split behaving weird in bash

Trying to use split with inotifywait which basically splits the file when the file is created from ftp-server. #!/bin/bash TARGET=/home/test-directory/incoming SPLITTED=/home/test-directory/...
0
votes
1answer
122 views

Split file into n files using csplit (or similar tool)

I have a huge file with the following pattern: ABC line 1 line 2 line 3 ABC line 1 line 2 ABC line1 ABC line 1 line 3 Using csplit tool I'm able to split the file above according to /ABC/ pattern ...
1
vote
2answers
404 views

Remove konsole split tab's title bar

I would like to remove the titlebar, the one just above my prompt, which has the fullscreen and close button. I only find options to edit the tab bar (Ctrl+Shift+t), just under the menu list, but ...
2
votes
2answers
172 views

“--numeric-suffixes” does not allow an argument with “split”

I'm trying to use the split command for a shell script I'm writing and I want to use the --numeric-suffixes flag in order to start my file count from 1. I try: split -a 1 -l 2 --numeric-suffixes=1 ...
0
votes
3answers
975 views

splitting a column in Bash based on '_'

Hello I have a similar problem to the one in this post But since I am new to Bash and my file is a bit different I could not modify and apply the answers to my code. I have a csv file with multiple ...
7
votes
3answers
3k views

How to split a string by the third .(dot) delimiter

I did a few research, I can split the string by '.' but the only thing I want to replace is the third '.', and the version number is actually variable so how can I do the replace/split? version: 1.8....
3
votes
2answers
505 views

Failing to untar

I am dealing with transferring large files from one machine to another (600GB+) and I'm tarring them up using tar -cpvzf file.tar.gz -C PATH_TO_DIR DIR Once finished with the tarring process, the ...
1
vote
1answer
85 views

how to separate tar.gz file to 5 files [duplicate]

we have huge file as du -sh * 7.7G HDP-2.6.5.0-centos7-rpm.tar.gz and we want to separate the file to 5 files as HDP1 HDP2 HDP3 HDP4 HDP5 and later I want to revert all HDP* to HDP-2.6.5.0-...
2
votes
1answer
300 views

Split a long grep pattern into multiple lines

To make my script a bit more readable I'm trying to split my long grep pattern. Is that possible? Example, in by bash script, instead of this long line smartctl -a /dev/sda | grep -Ei "...
0
votes
2answers
53 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
549 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
56 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
1answer
68 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
339 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
389 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 ...
2
votes
2answers
3k 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 ...
4
votes
2answers
3k 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
385 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"/...
1
vote
3answers
69 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
704 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
543 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
400 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
835 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
772 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 ...

1
2 3 4 5