07-06-2011
How to delete original files after using a tar operation.
I have a list of log files in a directory. Once i tar them I need to remove the original log files. How do i do it?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In a bash script:
src=”cooltrack.wav”
dst=”cooltrack.mp3”
lame $src $dst
I would like to add some line that would delete the source wav file like:
rm $src
but I would like this only if the encoding was successful.
What should I include before deleting the original to check that the... (2 Replies)
Discussion started by: Aia
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
On my Unix Server in my directory, I have 70 files distributed in the following directories (which have several other files too). These files include C Source Files, Shell Script Source Files, Binary Files, Object Files.
a) /usr/users/oracle/bin
b) /usr/users/oracle... (1 Reply)
Discussion started by: marconi
1 Replies
3. UNIX for Advanced & Expert Users
How do I make tar set the correct atime on the extracted version? The option --atime-preserve works just on the original, not on the extracted file.
The extracted files always have current time as atime, which is bad. (10 Replies)
Discussion started by: frankie06
10 Replies
4. Shell Programming and Scripting
HI,
if I have a tarfile called pmapdata.tar that contains
tar -tvf pmapdata.tar
-rw-r--r-- 0/0 21 Oct 15 11:00 2009 /var/tmp/pmapdata/pmap4628.txt
-rw-r--r-- 0/0 21 Oct 14 20:00 2009 /var/tmp/pmapdata/pmap23752.txt
-rw-r--r-- 0/0 1625 Oct 13 20:00 2009... (1 Reply)
Discussion started by: borderblaster
1 Replies
5. Shell Programming and Scripting
Hi all,
I have a folder hierarchy with many gz files in them. I would like to recursively decompress them, but keep the original files. I would also like to move all the decompressed files (these are very large HDF5 files with .CP12 extension) to another data folder.
Currently I am using four... (3 Replies)
Discussion started by: gansvv
3 Replies
6. Shell Programming and Scripting
I am completely new to shell scripting but have been assigned the task of creating several batch files to manipulate data. My final task requires me to find lines that have duplicates present then delete not only the duplicate but the original as well. The script will be used in a windows... (9 Replies)
Discussion started by: chino_1
9 Replies
7. Shell Programming and Scripting
Hi all,
I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies
8. UNIX for Advanced & Expert Users
I have folder ABC and files in ABC are links.
I want to create the same ABC folder in different path and copy the actual files from source ABC dir.
Can anyone provide HP-UX command for this?
note: cp -L is not working in HP-UX
Thanks in advance. (1 Reply)
Discussion started by: venkatababu
1 Replies
9. Shell Programming and Scripting
Hello
Below is my requirement
I have 3 files A1.txt , A2.txt and A3.txt . A2 is dynamically generating file
I want the merge of A1,A2 and A3 in A2.txt
Could you please help? (3 Replies)
Discussion started by: Pratik4891
3 Replies
10. UNIX for Beginners Questions & Answers
hi all
i am trying to tar and then zip files present dir by using the below command
tar -cvf ${abc}/xyz_backup_date_`date +%d%m%y%H%M%S`.tar xyz*
when the files are in less number the above command executes perfectly but when there are large number of files i am getting "arg list too... (5 Replies)
Discussion started by: manoj
5 Replies
DLB(6) Games Manual DLB(6)
NAME
dlb - NetHack data librarian
SYNOPSIS
dlb { xct } [ vfIC ] arguments... [ files... ]
DESCRIPTION
Dlb is a file archiving tool in the spirit (and tradition) of tar for NetHack version 3.1 and higher. It is used to maintain the archive
files from which NetHack reads special level files and other read-only information. Note that like tar the command and option specifiers
are specified as a continuous string and are followed by any arguments required in the same order as the option specifiers.
This facility is optional and may be excluded during NetHack configuration.
COMMANDS
The x command causes dlb to extract the contents of the archive into the current directory.
The c command causes dlb to create a new archive from files in the current directory.
The t command lists the files in the archive.
OPTIONS AND ARGUMENTS
v verbose output
f archive specify the archive. Default if f not specified is LIBFILE (usually the nhdat file in the playground).
I lfile specify the file containing the list of files to put in to or extract from the archive if no files are listed on the command
line. Default for archive creation if no files are listed is LIBLISTFILE.
C dir change directory. Changes directory before trying to read any files (including the archive and the lfile).
EXAMPLES
Create the default archive from the default file list:
dlb c
List the contents of the archive 'foo':
dlb tf foo
AUTHOR
Kenneth Lorber
SEE ALSO
nethack(6), tar(1)
BUGS
Not a good tar emulation; - does not mean stdin or stdout. Should include an optional compression facility. Not all read-only files for
NetHack can be read out of an archive; examining the source is the only way to know which files can be.
4th Berkeley Distribution 28 Oct 1993 DLB(6)