Many tar implementations have an option that allows them to read a file list from a file, allowing for find's output to be redirected and then read. In my opinion, not a very elegant solution. If I recall correctly, BSD tar uses -I and GNU tar uses -T. Like ps, tar is a ubiquitous utility whose usage, for anything non-trivial, varies a great deal between platforms of different lineage.
Regards,
Alister
Thank you, it worked with pax and cpio after the proper fixes.
Hi,
I have tried both the options in small dummy scripts, but somehow i can't differentiate between the two.
find . -name H* -exec ls -l {} \;
find . -name H* | xargs ls -l
Both work the ditto way.
Any help is appreciated. (19 Replies)
Hi
I need to move multiple (say 10 files) from one location to another location. My selection would be like this...
ls -ltr *.arc | head ---> Need to move top 10 files with single command without iterating in loop. I know we can move files like this with find command but not sure if I can... (4 Replies)
What I'm trying to do is perform a copy, well a ditto actually, on the results of a find command, but some inline string substitution needs to happen.
So if I run this code find ./ -name "*.tif" I get back these results.
.//1234567.tif
.//abcdefg.tif
Now the action from exec or xargs I... (2 Replies)
I am trying to delete files older than 60 days from a folder:
find /myfolder/*.dat -mtime +60 -exec rm {} \;
ERROR - argument list too long: find
I can't just give the folder name, as there are some files that I don't want to delete. So i need to give with the pattern (*.dat). I can... (3 Replies)
hi,
i've been trying to figure this weird error but I cannot seem to know why. I am using below find command:
find . \( ! -name . -prune \) -type f -mtime +365 -print
The above code returns no file because no files are really more then 365 days old. However, when I use xargs, its... (9 Replies)
Guys i want to run a command to list all directories that havn't been modified in over 548 days ( 1.5 yrs ).
Id like to run a script to first print what the command finds ( so i get a list of the files pre move ... i have a script set for this :
find /Path/Of\ Target/Directory/ -type d -mtime... (4 Replies)
I have read several docs on these on the web and looked at examples. I can't figure out the difference. In some cases you use one or the other or you combine them.
can someone help me understand this? (1 Reply)
Hi Friends,
Please help me to sort out this problem, I am running this in centos o/s and whenever I run this script I am getting "find: missing argument to `-exec' " but when I run the same code in the command line I didn't find any problem. I am using perl script to run this ... (2 Replies)
Hi,
What is the difference between the following commands
find . -type f -exec grep 'abc' {} \;
and
find . -type f | xargs grep 'abc'
Appreciate your help. (2 Replies)
Hello,
I am trying to move all the file listed by below command to /tmp/testing directory
find ./ -maxdepth 1 -type f -mtime +3
I tried using -exec and xargs - none of the combination is working?
Please, help (3 Replies)
Discussion started by: saurabh84g
3 Replies
LEARN ABOUT HPUX
tar
tar(4) Kernel Interfaces Manual tar(4)NAME
tar - format of tar tape archive
DESCRIPTION
The header structure produced by (see tar(1)) is as follows (the array size defined by the constants is shown on the right):
All characters are represented in ASCII. There is no padding used in the header block; all fields are contiguous.
The fields magic, uname, and gname are null-terminated character strings. The fields name, linkname, and prefix are null-terminated char-
acter strings except when all characters in the array contain non-null characters, including the last character. The version field is two
bytes containing the characters (zero-zero). The typeflag contains a single character. All other fields are leading-zero-filled octal
numbers in ASCII. Each numeric field is terminated by one or more space or null characters.
The name and the prefix fields produce the pathname of the file. The hierarchical relationship of the file is retained by specifying the
pathname as a path prefix, with a slash character and filename as the suffix. If the prefix contains non-null characters, prefix, a slash
character, and name are concatenated without modification or addition of new characters to produce a new pathname. In this manner, path-
names of at most 256 characters can be supported. If a pathname does not fit in the space provided, the format-creating utility notifies
the user of the error, and no attempt is made to store any part of the file, header, or data on the medium.
SEE ALSO tar(1)STANDARDS CONFORMANCE tar(4)