Sponsored Content
Top Forums Shell Programming and Scripting Archive directory script with tar/compress Post 302433651 by AIXfrog on Wednesday 30th of June 2010 07:24:59 AM
Old 06-30-2010
Sorry, but I'm getting the same error regarding line 5 Smilie

My files are named with a date as the first part of the filename (not the date they are created)

ie.
20100630_file1.csv
20100629_file1.csv
20100630_file2.csv
20100701_file3.csv
20100630_file3.csv
etc..

But I'm only interessted in compressing certain files for my archive.

ie. in the above list I only want to compress files with 20100630 in the filename (and delete them afterwards). On another day I might want to compress all files with 20100701 in the filename.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

tar command with compress option...

Hi ! i have to write a script that archivs homes not used since 3 years. First, my script gathers the users that are concerned, using the following command : ll -lt /home/*/.sh_history | egrep '2000|1999|1998|1997' | awk '{print $3}' i obtain a list like this : user_1 user_2 ...... (3 Replies)
Discussion started by: tomapam
3 Replies

2. UNIX for Advanced & Expert Users

tar and compress

I need to compress and tar a couple files in a directory, but I also want the original files unchanged, ie if I compress a1.cpp , then a1.cpp becomes a1.cpp.z, but what I want after running the compress utility is to have both a1.cpp as it is and a1.cpp.z and then tar a1.cpp.z to an... (4 Replies)
Discussion started by: muru
4 Replies

3. Shell Programming and Scripting

Search, Tar and Compress in one line

Hi all, I am supposed to collect a huge amount of log files from a unix system (HP-UX) onto a local system. The log files are not in one place, but they are scattered all over the Unix server. The unix server has only limited space, so that I can not create a tar file first and then compress it.... (4 Replies)
Discussion started by: bluesky099
4 Replies

4. UNIX for Dummies Questions & Answers

create tar archive without preserving directory structure?

I am adding some individual files to a tar archive and would like them to be added to the archive without any directory hierarchy, even though the files themselves exist in levels of hierarchy. Unfortunately, tar seems to always preserve the directory hierarchy when it adds the files. Here is... (2 Replies)
Discussion started by: Special_K
2 Replies

5. Shell Programming and Scripting

compress directories with .tar extension

hi guys.. Since am a bit new to shell scripting, can anyone help me with this problem please.. i've been struggling with it since 2 days. :( I have a directory lets say myFolder and within it I have sub directories let say myFolder1.tar, myFolder2, myFolder3, etc. I need to write a shell... (12 Replies)
Discussion started by: kanexxx
12 Replies

6. UNIX for Dummies Questions & Answers

Compress the file using Tar command

Hi, When i am tar the file particular ,csv file format in a folder i am receiving the error Command: tar cf New_data.tar /new/file/mari/getdata/small/*.xml Arguements too long But sometimes i am able to compress other folder but the tar folder contains all the file format and... (10 Replies)
Discussion started by: marivinay
10 Replies

7. Shell Programming and Scripting

tar and compress in one step

I know there is a way to tar up directory and sub-directories and have it compressed all in one command but but the syntax escapes me. I seem to re-call something like this: tar -cvf /tmp/file.tar - | compress ? Can somebody please provide me with the syntax on how to tar/compress and... (6 Replies)
Discussion started by: BeefStu
6 Replies

8. Shell Programming and Scripting

script to compress files in directory that changes its name every day

Hi all I have the following script that should compress a file in a directory: # compress log files older than 2 days find /u01/easydone/DBDUMPS/*.dmp -mtime +2 -exec gzip {} \; BUT the problem is that these files that I want to compress are inside a directory with following format: ... (5 Replies)
Discussion started by: fretagi
5 Replies

9. Shell Programming and Scripting

Extract tar archive on remote server in another directory

HI Please suggest how to untar archive on remote sever. When im trying use regular command without any flags everything working fine: $( ssh <user>@<server> -n '. ~/.profile >/dev/null 2>&1 ; cd /path_1 ; copiedIVR_name=`ls -tr | tail -1` ; tar xvf $copiedIVR_name ' ) but i have to ... (1 Reply)
Discussion started by: BACya
1 Replies

10. UNIX for Dummies Questions & Answers

Extract tar archive on remote server in another directory

HI All Please suggest how to untar archive on remote sever. When im trying use regular command without any flags everything is working fine: $( ssh <user>@<server> -n '. ~/.profile >/dev/null 2>&1 ; cd /path_1 ; copiedIVR_name=`ls -tr | tail -1` ; tar xvf $copiedIVR_name ' ) but when im... (9 Replies)
Discussion started by: BACya
9 Replies
CSV2MIPE(1)						User Contributed Perl Documentation					       CSV2MIPE(1)

NAME
csv2mipe.pl - Generates MIPE file based on 3 tab-delimited files based on MIPE version v1.1 arguments: * tab-delimited file with PCR-level data * tab-delimited file with SNP-level data * tab-delimited file with assay-level data Columns in file with PCR-level data: pcr_id pcr_modified (might be multiple, divided by semi-colon ";") pcr_project (might be multiple, divided by semi-colon ";") pcr_researcher (might be multiple, divided by semi-colon ";") pcr_species source_type source_id design_seq primer1_oligo primer1_seq primer1_tm primer2_oligo primer2_seq primer2_tm design_remark (might be multiple, divided by semi-colon ";") use_seq use_revcomp use_remark (might be multiple, divided by semi-colon ";") pcr_remark (might be multiple, divided by semi-colon ";") Columns in file with SNP-level data: pcr_id snp_id snp_pos snp_amb snp_remark (might be multiple, divided by semi-colon ";") Columns in file with assay-level data: pcr_id snp_id assay_id assay_type assay_enzyme assay_oligo assay_specific assay_tail assay_strand assay_remark (might be multiple, divided by semi-colon ";") SYNOPSIS
csv2mipe.pl <pcr_file.csv> <snp_file.csv> <assay_file.csv> ADDITIONAL INFO
See http://mipe.sourceforge.net AUTHOR
Jan Aerts (jan.aerts@bbsrc.ac.uk) perl v5.14.2 2005-07-20 CSV2MIPE(1)
All times are GMT -4. The time now is 06:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy