archive with .orig extension


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting archive with .orig extension
# 1  
Old 10-12-2006
archive with .orig extension

i am moving old file from folder to archive file by this command
ls -rt | grep -v '^archive$' | sed '$d' | xargs -I{} mv {} archive


can I add .orig extension to all file and then move into archive folder.

Where would be adjectly I place my syntex.
# 2  
Old 10-12-2006
ls -rt | grep -v '^archive$' | sed '$d' | xargs -I{} mv {} archive/{}.orig


I guess archive is the folder, then just add "/{}.orig" in the end
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to archive logs and sftp to another archive server

Requirement: Under fuse application we have placeholders called containers; Every container has their logs under: <container1>/data/log/fuse.log <container1>/data/log/fuse.log.1 <container1>/data/log/fuse.log.XX <container2>/data/log/fuse.log... (6 Replies)
Discussion started by: Arjun Goswami
6 Replies

2. UNIX for Dummies Questions & Answers

Cpio archive help

Hi I'm new to the forum and looking for some help with cpio archive creation. I have a bunch of directories that I need to make into a cpio archive. The problem I'm having is that when I input the commands I get the cpio archive but it creates a duplicate of the archive inside the archive... (4 Replies)
Discussion started by: reeves1985
4 Replies

3. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

Hi All, I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing. 1.I need to display the .done files from the directory. 2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory ... (2 Replies)
Discussion started by: girija.g6
2 Replies

4. Shell Programming and Scripting

Log archive

Hi, I am trying to move old file to archive folder. find /sourcedirectory/logs/* -type f -mtime +30 -exec mv "{}" /sourcedirectory/logs/archive \; The above command not only search for old file in /sourcedirectory/logs/ folder but also searchs in /sourcedirectory/logs/archive ( what... (3 Replies)
Discussion started by: lpprasad321
3 Replies

5. Shell Programming and Scripting

Archive old file

Hi All, I have the below senario. File_Name="^Test>*" Move_Delay=12 Source_Folder="/odi/nas/" Target_Folder="/odi/nas//archive" Now I want to move any file that is older than "Move_Delay" hours and matching "File_Name" pattern from the folder "Source_Folder" to the folder... (2 Replies)
Discussion started by: Anupam_Halder
2 Replies

6. Shell Programming and Scripting

Identify duplicates and update the last 2 digits to 0 for both the Orig and Dup

Hi, I have a requirement where I have to identify duplicates from a file based on the first 6 chars (It is fixed width file of 12 chars length) and whenever a duplicate row is found, its original and duplicate row's last 2 chars should be updated to all 0's if they are not same. (I mean last 2... (3 Replies)
Discussion started by: farawaydsky
3 Replies

7. Shell Programming and Scripting

Extracting from archive | compressing to new archive

Hi there, I have one huge archive (it's a system image). I need sometime to create smaller archives with only one or two file from my big archive. So I'm looking for a command that extracts files from an archive and pipe them to another one. I tried the following : tar -xzOf oldarchive.tgz... (5 Replies)
Discussion started by: chebarbudo
5 Replies

8. UNIX for Advanced & Expert Users

overhead in the archive

Hi everyone, I am currently trying to work out the size overhead in the library archive. The total size of all my objects file is about 100KB. However, when I package them into the archive (libXX.a), the size gets boosted up to 200KB. I want to know what exact is that 100KB overhead. I tried... (1 Reply)
Discussion started by: jasoncrab
1 Replies

9. Shell Programming and Scripting

Archive files

Hi All, I wrote this script: #!/bin/ksh while read DAYS ARCH_PATH do cd $ARCH_PATH find . \( -type d ! -name . -prune \) -o -type f -mtime +$DAYS -exec tar -cv f kay_`date +%d%m%y%H%M`.tar {} \; cd - done < filestoarchive.txt The problem is, in a folder of 7files, I would... (13 Replies)
Discussion started by: kayarsenal
13 Replies
Login or Register to Ask a Question