05-06-2011
Bartus ,
I did understand the first part of the command
Could you also please explain the later part of the command ,
xargs -i bash -c "echo {} | cpio -pdmu /tmp/arc; rm -f {}" What is the usage of xargs , bash , cpio -pdmu
Is there any other suggestions ?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am a shell-script newbie and am looking to synchronize certain files in two directory structures.
Both these directory-trees are in CVS and so I dont want the CVS directory to be copied over.
I want only .sh and .pl files in each subdirectory under these directory trees to be... (3 Replies)
Discussion started by: sharpsharkrocks
3 Replies
2. Shell Programming and Scripting
Hello, this is probably another really simple tasks for most of you gurus, however I am trying to make a script which takes an input, greps a specific file for that input, prints back to screen the results (which are directory names) and then be able to use the directory names to move files.... (1 Reply)
Discussion started by: JayC89
1 Replies
3. Shell Programming and Scripting
Hi,
I have various log files in different paths. e.g.
a/b/c/d/e/server.log
a/b/c/d/f/server.log
a/b/c/d/g/server.log
a/b/c/h/e/server.log
a/b/c/h/f/server.log
a/b/c/h/g/server.log
a/b/c/i/e/server.log
a/b/c/i/e/server.log
a/b/c/i/e/server.log
and above these have an archive folder... (6 Replies)
Discussion started by: acc01
6 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process.
I wanted to disply using a unix command all the directories recursively excluding files.
I tried 'ls -FR' but that display files as... (3 Replies)
Discussion started by: pointers
3 Replies
5. Shell Programming and Scripting
Hi,
Seems like I need help again with a problem:
I want to delete all files from my lets say "Music" Directory inkluding all of the subfolders
except for .mp3 and .MP3 files.
I tried it with globalignoring mp3 files, finding and deleting all other files, which
resulted in all files... (3 Replies)
Discussion started by: pasc
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
In a parent directory there are several files in the form
IDENTIFIER1x
IDENTIFIER1.yyy
IDENTIFIER1_Z, etc
IDENTIFIER2x
IDENTIFIER2.yyy
IDENTIFIER2_Z, etc
IDENTIFIER3x
IDENTIFIER3.yyy,
IDENTIFIER3_Z, etcIn the same parent directory there are corresponding directories named... (7 Replies)
Discussion started by: spirospap
7 Replies
7. Shell Programming and Scripting
Hi.
I found many scripts in the web of achieving this.
But I like to use this one
find /EDWH-DMT03 -xdev -size +10000 -exec ls -la {} \;|sort -n -k 5 > LARGE.rst
But the problem is, why it still list out files with 89 bytes as the output? Is there anything wrong with the command?
My... (7 Replies)
Discussion started by: aimy
7 Replies
8. Shell Programming and Scripting
Is it possible to only copy selected files+its directories when you are copying recursively?
find /OriginalFolder/* -type -d \{ -mtime 1 -o -mtime 2 \ } -exec cp -R {} /CopyTo/'hostname'__CopyTo/ \; -print
From the above line, I want to only copy *txt and *ini files from /OriginalFolder/*
... (4 Replies)
Discussion started by: apacheLinux
4 Replies
9. UNIX for Beginners Questions & Answers
Hello,
I'm a first time poster looking for help in scripting a task in my daily routine. I am new in unix but i am attracted to its use as a mac user.
Bear with me...
I have several files (20) that I manually drag via the mouse into several named directories over a network. I've used rsync... (14 Replies)
Discussion started by: SonnyClark
14 Replies
AR(1) General Commands Manual AR(1)
NAME
ar - archive and library maintainer
SYNOPSIS
ar key [ posname ] afile name ...
DESCRIPTION
Ar maintains groups of files combined into a single archive file. Its main use is to create and update library files as used by the
loader. It can be used, though, for any similar purpose.
Key is one character from the set drqtpmx, optionally concatenated with one or more of vuaibcl. Afile is the archive file. The names are
constituent files in the archive file. The meanings of the key characters are:
d Delete the named files from the archive file.
r Replace the named files in the archive file. If the optional character u is used with r, then only those files with modified dates
later than the archive files are replaced. If an optional positioning character from the set abi is used, then the posname argument
must be present and specifies that new files are to be placed after (a) or before (b or i) posname. Otherwise new files are placed
at the end.
q Quickly append the named files to the end of the archive file. Optional positioning characters are invalid. The command does not
check whether the added members are already in the archive. Useful only to avoid quadratic behavior when creating a large archive
piece-by-piece.
t Print a table of contents of the archive file. If no names are given, all files in the archive are tabled. If names are given,
only those files are tabled.
p Print the named files in the archive.
m Move the named files to the end of the archive. If a positioning character is present, then the posname argument must be present
and, as in r, specifies where the files are to be moved.
x Extract the named files. If no names are given, all files in the archive are extracted. In neither case does x alter the archive
file.
v Verbose. Under the verbose option, ar gives a file-by-file description of the making of a new archive file from the old archive and
the constituent files. When used with t, it gives a long listing of all information about the files. When used with p, it precedes
each file with a name.
c Create. Normally ar will create afile when it needs to. The create option suppresses the normal message that is produced when
afile is created.
l Local. Normally ar places its temporary files in the directory /tmp. This option causes them to be placed in the local directory.
FILES
/tmp/v* temporaries
SEE ALSO
ld(1), ar(5), lorder(1)
BUGS
If the same file is mentioned twice in an argument list, it may be put in the archive twice.
AR(1)