05-27-2009
You could try wrapping the find command in a for loop. Not sure which OS or shell you're using but under Bash on Linux:
Save the starting directory:
export startdir="/dir"
Then loop:
for dir in `find . -name 'config' -type d`;do cd ${dir//.\//};cd ..;do your thing;cd $startdir;done
Breakdown:
${dir//.\//} will remove the leading ./ from the find output
cd.. will back up to the parent directory
cd $startdir will return to starting directory for the next iteration through the loop
Hope this helps point you in the right direction.
9 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
Hello Friends,
I use mondoarchive to take a bootable backup of my system on a DVD. But whenever there are large files on the system, i.e. the size of the entire backup increases beyond 4.5 GB, the mondoarchive utility does not take any backup. This is quite obvious because the size of DVD is... (1 Reply)
Discussion started by: shamik
1 Replies
2. Shell Programming and Scripting
hi there,
looking for a tad assistance if at all possible, im trying to create a backup that will backup all files with a particular .ext to a new folder with the same file name but also with the last modified time and date in the file name ie
so if the file information.txt was last modified at... (3 Replies)
Discussion started by: jgraham95
3 Replies
3. UNIX for Dummies Questions & Answers
Hi there, I'm trying to pull all my flacs out of my Music collection. I can do it with following command
find b/ -name *.flac -exec mv {} flac/ \;
which works great except it moves all the flac files to the flac folder. I want it to recreate the original folder the flacs were found in and mv... (8 Replies)
Discussion started by: fistikuffs
8 Replies
4. Homework & Coursework Questions
first off let me introduce myself. My name is Eric and I am new to linux, I am taking an advanced linux administration class and we are tasked with creating a script to add new users that anyone can run, has to check for the existence of a directory. if the directory does not exist then it has... (12 Replies)
Discussion started by: pbhound
12 Replies
5. Shell Programming and Scripting
Hi,
I have backup file of database in my server. I want to create a that database in the same Mysql Server. How can I do that?
Please send the steps to create the database using backup file?
Thanks a lot, (1 Reply)
Discussion started by: aish11
1 Replies
6. SCO
hi guys
im beginner in unix and have many problem with this.
i have one old machine that Sco unix OpenServer 5.0.7 installed on it.
i wana backup from all partition of hard disk and restore it on another unix machine. how can i do that ?
thing like hard to hard for windows !!!
i only know how... (14 Replies)
Discussion started by: farzad226
14 Replies
7. Shell Programming and Scripting
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies
8. Shell Programming and Scripting
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Discussion started by: digioleg54
9 Replies
9. UNIX for Beginners Questions & Answers
A process xyz is running and creating file1, file2, file3, .... filen. how do i know if the process has stopped and createtime of the last file (filen) is older than 5 minutes?
OS is AIX (3 Replies)
Discussion started by: malaika
3 Replies
LEARN ABOUT CENTOS
xcursorgen
XCURSORGEN(1) General Commands Manual XCURSORGEN(1)
NAME
xcursorgen - create an X cursor file from a collection of PNG images
SYNOPSIS
xcursorgen [ -V ] [ --version ] [ -? ] [ --help ] [ -p dir ] [ --prefix dir ] [ config-file [ output-file ] ]
DESCRIPTION
Xcursorgen reads the config-file to find the list of cursor images along with their hotspot and nominal size information. Xcursorgen con-
verts all of the images to Xcursor format and writes them to the output-file.
Each line in the config file is of the form:
<size> <xhot> <yhot> <filename> <ms-delay>
Multiple images with the same <size> are used to create animated cursors, the <ms-delay> value on each line indicates how long each image
should be displayed before switching to the next. <ms-delay> can be elided for static cursors.
If config-file is not specified, or is specified as "-", standard input is used for the configuration file. If output-file is not speci-
fied, or is specified as "-", standard output is used for the output file.
OPTIONS
-V, --version
Display the version number and exit.
-?, --help
Display the usage message and exit.
-p dir, --prefix dir
Find cursor images in the directory specified by dir. If not specified, the current directory is used.
SEE ALSO
Xcursor(3)
X Version 11 xcursorgen 1.0.5 XCURSORGEN(1)