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 [ file ... ]
DESCRIPTION
Ar maintains groups of files combined into a single archive file, afile. The main use of ar is to create and update library files for the
loaders 2l(1), etc. It can be used, though, for any similar purpose.
Key is one character from the set drqtpmx, optionally concatenated with one or more of vuaibclo. The files are constituents of the archive
afile. The meanings of the key characters are:
d Delete files from the archive file.
r Replace files in the archive file, or add them if missing. Optional modifiers are
u Replace only files with modified dates later than that of the archive.
a Place new files after posname in the archive rather than at the end.
b or i Place new files before posname in the archive.
q Quick. Append files to the end of the archive without checking for duplicates. Avoids quadratic behavior in
t List a table of contents of the archive. If names are given, only those files are listed.
p Print the named files in the archive.
m Move the named files to the end or elsewhere, specified as with
o Preserve the access and modification times of files extracted with the x command.
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. Give a file-by-file description of the making of a new archive file from the old archive and the constituent files. With
p, precede each file with a name. With t, give a long listing of all information about the files, somewhat like a listing by ls(1),
showing
mode uid/gid size date name
c Create. Normally ar will create a new archive when afile does not exist, and give a warning. Option c discards any old contents
and suppresses the warning.
l Local. Normally ar places its temporary files in the directory /tmp. This option causes them to be placed in the local directory.
When a d, r, or m key is specified and all members of the archive are valid object files for the same architecture, ar inserts a table of
contents, required by the loaders, at the front of the library. The table of contents is rebuilt whenever the archive is modified, except
when the q key is specified or when the table of contents is explicitly moved or deleted.
EXAMPLE
ar cr lib.a *.o
Replace the contents of library with the object files in the current directory.
FILES
/tmp/v*
temporaries
SOURCE
/sys/src/cmd/ar.c
SEE ALSO
2l(1), ar(6)
BUGS
If the same file is mentioned twice in an argument list, it may be put in the archive twice.
This command predates Plan 9 and makes some invalid assumptions, for instance that user id's are numeric.
AR(1)