Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Splitting files into a specific directory Post 302368374 by amcrisan on Wednesday 4th of November 2009 05:25:47 PM
Old 11-04-2009
it turns out that - is the secret... I had no idea what the man page was talking about with that dash, but doing this

bzcat $datadir/FILE.bz2 | split -l num -d - $outputdir/FILE_NAME

will put it in the directory and with the name.

Thanks for all the help : )
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete files in specific directory

i have a directory "ABC" with lots of old files and sub directories in it. the issue now is i want to delete away files which are older than 15 days in "ABC" without deleting the files in the sub directories and without deleting the sub directory. i tried using find command but it will drill down... (2 Replies)
Discussion started by: legato
2 Replies

2. Solaris

List all files that contain a specific directory

I need to list all files and subdirectories that contain "oradata". For example, I have several files in several different directories that contain "oradata". I.e. /u07/oradata/1.dbf /u09/unix/whatever/oradata/2.xxx That is, whatever file on the system that contains a directory called... (7 Replies)
Discussion started by: Sat510
7 Replies

3. UNIX for Dummies Questions & Answers

deleting specific lines from all files in a directory

I have a directory full of text data files. Unfortunately I need to get rid of the 7th and 8th line from them all so that I can input them into a GIS application. I've used an awk script to do one at a time but due to the sheer number of files I need some kind of loop mechanism to automate... (3 Replies)
Discussion started by: vrms
3 Replies

4. Shell Programming and Scripting

How to find a specific files in a many directory

Dear All, Appreciate some help here. I have a log of report. It located in several directory as below: Directory: mysscpr1 mysscpr2 mysscpr3 my_scnpr4 In the directory it contain hundred of files. i need to find a specific files that contain 'invc2345' in the directory. How... (7 Replies)
Discussion started by: selamba_warrior
7 Replies

5. Shell Programming and Scripting

Delete all files if another files in the same directory has a matching occurence of a specific word

Hello, I have several files in a specific directory. A specific string in one file can occur in another files. If this string is in other files. Then all the files in which this string occured should be deleted and only 1 file should remain with the string. Example. file1 ShortName "Blue... (2 Replies)
Discussion started by: premier_de
2 Replies

6. UNIX for Dummies Questions & Answers

How to search all the files in a directory for a specific string

Hi Guys, I want to search the content of all the files (of a particular type like .txt) in a directory for a specific string pattern. Can anyone help me? Thanks (7 Replies)
Discussion started by: mwrg
7 Replies

7. Shell Programming and Scripting

Cronjob for recognizing changes and/or new files in specific directory

Hey Guys, is there a way to create a cronjob to watch over all changes in a specific directory, for example /home/user and send them, if there are any changes, to a server:confused: Thanks Sebi0815 (4 Replies)
Discussion started by: Sebi0815
4 Replies

8. Shell Programming and Scripting

Splitting Files with awk into other directory

I am trying to split into different files using awk: cat files | gawk '$1 ~ /---/ || $1 ~ /^deleting$/ || $1 ~ /^sorting$/ || $1 ~ /==/ {print}'| gawk '$1 ~ /---/ || $1 ~ /^deleting$/ || $1 ~ /^sorting$/ || $1 ~ /==/ {print}' |gawk '//{x="F"++i;}{print > x;}' What I am trying to do is make F*... (3 Replies)
Discussion started by: newbie2010
3 Replies

9. Shell Programming and Scripting

How to copy a directory without specific files?

Hi I need to copy a huge directory with thousands of files onto another directory but without *.WMV files (and without *.wmv - perhaps we need to use *.). Pls advise how can I do that. Thanks (17 Replies)
Discussion started by: reddyr
17 Replies

10. Shell Programming and Scripting

Delete all files if another files in the same directory has a matching occurrence of a specific word

he following are the files available in my directory RSK_123_20141113_031500.txt RSK_123_20141113_081500.txt RSK_126_20141113_041500.txt RSK_126_20141113_081800.txt RSK_128_20141113_091600.txt Here, "RSK" is file prefix and 123 is a code name and rest is just timestamp of the file when its... (7 Replies)
Discussion started by: kridhick
7 Replies
PRISTINE-BZ2(1) 						   pristine-bz2 						   PRISTINE-BZ2(1)

NAME
pristine-bz2 - regenerate pristine bz2 files SYNOPSIS
pristine-bz2 [-vdk] gendelta file.bz2 delta pristine-bz2 [-vdk] genbz2 delta file DESCRIPTION
This is a complement to the pristine-tar(1) command. Normally you don't need to run it by hand, since pristine-tar calls it as necessary to handle .tar.bz2 files. pristine-bz2 gendelta takes the specified bz2 file, and generates a small binary delta file that can later be used by pristine-bz2 genbz2 to recreate the original file. pristine-bz2 genbz2 takes the specified delta file, and compresses the specified input file (which must be identical to the contents of the original bz2 file). The resulting file will be identical to the original gz file used to create the delta. The approach used to regenerate the original bz2 file is to figure out how it was produced -- what compression level was used, whether it was built with bzip2(1) or with pbzip2(1). Note that other tools exist, like bzip2smp or dbzip2, but they are said to be bit-identical with bzip2. Anyway, bzip2 looks like the most widespread implementation, so it's hard to find bzip2 files that make pristine-bz2 fail. Please report! The deprecated bzip1 compression method hasn't been implemented. If the delta filename is "-", pristine-bz2 reads or writes it to stdio. OPTIONS
-v Verbose mode, show each command that is run. -d Debug mode. -k Don't clean up the temporary directory on exit. -t Try harder to determine how to generate deltas of difficult bz2 files. ENVIRONMENT
TMPDIR Specifies a location to place temporary files, other than the default. AUTHOR
Joey Hess <joeyh@debian.org>, Faidon Liambotis <paravoid@debian.org>, Cyril Brulebois <cyril.brulebois@enst-bretagne.fr> Licensed under the GPL, version 2. perl v5.14.2 2013-06-01 PRISTINE-BZ2(1)
All times are GMT -4. The time now is 06:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy