Questions tagged [split]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
66 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
21 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
49 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
54 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
49 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
36 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
75 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
61 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
28 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
32 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
43 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
43 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 ...
0
votes
1answer
132 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
75 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
394 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
1k 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
190 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
64 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-...
1
vote
1answer
137 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
31 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
201 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
40 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
62 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
264 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
295 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
1k 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
2k 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
285 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
61 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
554 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
382 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
277 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
466 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
616 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
1k 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
647 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
130 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
27 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
70 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
113 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
158 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
689 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' /...
-2
votes
1answer
574 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
2answers
487 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
79 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
762 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
449 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
259 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
512 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
183 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 ...

1
2 3 4 5