hmm... lemme give it a shot:
you can combine the files like this
ls -1R|grep :$|sed 's/:$//g'| awk '{system("cat "$1"/*)}' > bigfile
Thanks NYankz for your quick reply but I didn't get it & also didn't work.Can you please let me know what are you doing there.
And, here is what I have done.
It works fine merging all the log files in each directory to a single one called merged.txt & then removing those files. But now, I am again stuck with other problem.
The above script looks into each directory and merges the files but how to check only for certain subdirectories and not all of them.
e.g. root has 9 subdir with names like subdir-1-subdir-9.I want to do this only for subdir 2,4,6.How should I go for that.
I'll like if soemone posts different view on my original problem so that I can learn soemthing new.
Dear All,
I want to write the Unix command that searches through all subdirectories, finds the files named ''core'' and deletes them.
I will very much appreciate your help.
David (4 Replies)
Hello:
Could someone please explain to me how to create a subdirectory in the /home directory. I have tried creating a new user but the default path for a new user is /export/home. I am running Unix 5.8 on a Sun Blade 100. Thanks. (8 Replies)
Suppose I have two directories a and b. Each directory has a few subdirectories, a1 a2 a3 and b1, b2, b3 respectively.
Using ls, I can see a and b. Then I need cd a, ls, cd ../b, ls to see all the subdirectories.
How to see all the directories and subdirectories easily, say using just one... (2 Replies)
Here is my question in bash
for f in f1 f2
do
cd $f
cd ??? # i need to enter the two layers of sub folders then find the folder named "abcde" ?
cd .. # how to get out two layers subdirectories?
cd ..
done (2 Replies)
Here is my question in bash
for f in f1 f2
do
cd $f
cd ??? # i need to enter the two layers of sub folders then find the folder named "abcde" ?
cd .. # how to get out two layers subdirectories?
cd ..
done (3 Replies)
Hello,
Can anyone help me figure out how to test if the item in the directory is a subdirectory?
I'm writing a code to copy all the contents of directory1 to directory2, but I want to skip all the subdirectories.
Thanks! (4 Replies)
I have 2 directories a/ and b/,
they have different subdirectories, how to diff with missing file, or missing subdirectory
and if i have in a/ directory "a/ACD/DEF" DEF is a file, but in b/ directory "b/ACD/DEF is a SUBDIRECTORY, how to diff it, thanks
my solution for directories,
... (7 Replies)
Please help me with a shell script to get the stats on many subdirectories (sub1), (sub2) etc under a mother directory (big)
/big
|
|_______sub1
|_______sub2
|_______sub3
---------
I want to know
1. What is the last file accessed in each subdirectory with date and by whom
2.... (2 Replies)
I found this awesome sed script here:
https://www.unix.com/shell-programming-scripting/48228-perl-search-string-line-then-search-replace-text.html
sed -i '/MatchText/ s/ReplaceMe/REPLACED/' filename
Question though to save me manually doing this.
How do I do this from a root directory... (6 Replies)
Discussion started by: Astrocloud
6 Replies
LEARN ABOUT REDHAT
foomatic-kitload
FOOMATIC-KITLOAD(8) System Manager's Manual FOOMATIC-KITLOAD(8)NAME
foomatic-kitload - installs a data kit into the foomatic database.
SYNOPSIS
foomatic-kitload [ -k kit-dir] [ -d dest-dir]...
DESCRIPTION
foomatic-kitload installs a foomatic data kit into the local data library. It takes a -k dirname option, where dirname is the toplevel
directory of a foomatic driver "kit". A "kit" is a selection of XML source files arranged exactly as in the source/section of the master
database (ie, opt/driver/printer/ subdirs).
GIMP-Print's foomatic-generator produces exactly such a kit.
Foomatic-kitload is moderately paranoid about kits: the kit must contain at least one of printer, driver or opt; the kit must contain only
files ending in .xml, the kit cannot be the local library itself, etc. But it does not inspect the contents of the kit files in any way.
Options
-k dirname
dirname is the toplevel directory of a foomatic driver "kit".
-d destdir
destdir is a prefix to prepend to the install path. This will not normally be required, but is useful if installing into a tem-
porary `staging area' prior to installing in the final destination.
EXIT STATUS
foomatic-kitload returns 0 on success, 255 or something else when an error occurs.
AUTHOR
Manfred Wassmann <manolo@NCC-1701.B.Shuttle.de> for the foomatic project using output from the associated binary.
BUGS
Please send bug reports to foomatic-devel@linuxprinting.org.
Foomatic Project 2001-05-07 FOOMATIC-KITLOAD(8)