A way to list directories that contain specific files.
Hi everyone
My issue is this, I need to list all the sub directories in a directory that contains files that have the extension *.log, *.dat and *.out . After reviewing the output i need to delete those directories i do not need. I am running Solaris 10 in a bash shell. I have a script that I believe will list the directories that I was hoping someone here could verify the syntax but I still need a way to delete them without having to do rm -R for each one.
ABC= name of directory
Thanks in advance
Moderator's Comments:
Please use code tags
Last edited by jim mcnamara; 01-13-2015 at 12:04 PM..
Reason: forgot the include script
Hello,
I would like to list the files from all directories that has been modified more than 1 month ago, and whose name is like '*risk*log'.
I think a script like this should work :
ls -R | find -name '*risk*.log' -mtime 30 -type f
But it tells me "no file found" though I can see some.
... (4 Replies)
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)
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)
I would like to transfer all files ending with .log from /tmp and to /tmp/archive (using find )
The directory structure looks like :-
/tmp
a.log
b.log
c.log
/abcd
d.log
e.log
When I tried the following command , it movies all the log files... (8 Replies)
Can anyone come up with a unix command that lists
all the files, directories and sub-directories in the current directory
except a folder called log.?
Thank you in advance. (7 Replies)
Hi,
I have to find specific files only in the current directory...not in the sub directories.
But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help..
I am using the below command. And i am... (2 Replies)
Here is my dir structure:
/tmp/dave/myappend.txt
/tmp/dave/dir1/test.txt
/tmp/dave/dir2/test.txt
/tmp/dave/dir3/test.txt
/tmp/dave/dir4/test.txt
I want to append the contents of myappend.txt to the end of each file with the name "test.txt" in all dirs in /tmp/dave/
I have tried this:... (2 Replies)
I have been running a program mseed2sac using the following command
cd IV
find . -type f -exec /swadmin/mseed2sac '{}' \;
The problem is that I end up with a lot of files in directory IV.
Instead I would like to select the designator HHZ, create a
directory IV.SAC and all the files output... (11 Replies)
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
LEARN ABOUT SUSE
scrollkeeper-update
SCROLLKEEPER-UPDATE(8) System Manager's Manual SCROLLKEEPER-UPDATE(8)NAME
scrollkeeper-update - identify new, modified, or removed OMF files and update the scrollkeeper databases
SYNOPSIS
scrollkeeper-update [ -v ] [ -q ] [ -n ] [ -p database-directory ] [ -o omf-directories ]
DESCRIPTION
This synchronizes the scrollkeeper database with the OMF directory. It searches the scrollkeeper OMF directory to identify if any files
were added, removed, or modified and updates its internal database files to reflect any changes.
This utility is generally executed as the last step of installation, after the OMF file is copied into place. It is also typically the
last step of uninstallation, after the OMF file is removed. Using this, an administrator can easily manually install and uninstall docu-
ments into the database. It can also be run to guarantee the database is fully up-to-date.
Note that because scrollkeeper-update is normally run during installation and its output is typically seen by users, non-critical warnings
and errors such as those caused by invalid metadata are written to the log file instead of to the terminal. Developers should use the log
file to identify any problems.
OPTIONS -v Be verbose: Say which scrollkeeper-install and scrollkeeper-uninstall commands are being run to bring the database up to date.
-q Run in quiet mode, suppressing output of all but the most serious warning and error messages to STDOUT. Note that most output to
the log file will be unchanged.
-n Use the network to retrieve the DTD if it is not available via the system's XML catalog.
-p database-directory
Use database-directory as the directory for the scrollkeeper database rather than the usual one obtained by running scrollkeeper-
config --pkglocalstatedir.
-o omf-directories
Examine the directories named in omf-directories rather than the one usual one obtained by running scrollkeeper-config --omfdir (or
specified in the OMF_DIR environment variable if set). The omf-directories should be a colon-separated list of directories.
ENVIRONMENT
OMF_DIR
If no -o option is specified, this variable overrides the scrollkeeper-config-provided OMF directory. It should be a colon-sepa-
rated list of directories.
FILES
/var/lib/scrollkeeper/scrollkeeper_docs
/var/lib/scrollkeeper/TOC/<docnumber>
/var/lib/scrollkeeper/<locale>/scrollkeeper_cl.xml
/var/lib/scrollkeeper/<locale>/scrollkeeper_extended_cl.xml
/var/log/scrollkeeper.log
AUTHOR
Laszlo Kovacs <laszlo.kovacs@sun.com>
Dan Mueth <d-mueth@uchicago.edu>
SEE ALSO scrollkeeper-config(1), scrollkeeper-gen-seriesid(1), scrollkeeper.conf(5), scrollkeeper(7), scrollkeeper-preinstall(8), scrollkeeper-
rebuilddb(8)scrollkeeper Dec 5, 2001 SCROLLKEEPER-UPDATE(8)