03-18-2009
find directories
I am looking a script which will find garbase directories (10 char. long)..which need to delete empty dir excluding symlink and system directories.
I tried this partial script but it just find directories create a file which contains link directories..can somebody help me to complete this scripts.
!#/usr/bin/sh
for dir in $(find / -type d -name '??????????')
do ll $dir | grep ^l > /home/user/linklist
if [ ls $dir eq 0 ] then rmdir $dir # not sure abt this line
done
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
We have in a file a list of the path of files from one server.
We want to search if these files exist on another server , but the path on this new server isn't the same.
We want to use the command "awk" but there isn't the god way.
Example:
on server 1 in a file : listServer1.txt... (4 Replies)
Discussion started by: steiner
4 Replies
2. Shell Programming and Scripting
I'm having problems figuring out the process to find directories that DO NOT contain a certain file. I have a mp3 collection that all the album art is name "folder.jpg". Not all the albums have images. I need a way to find the albums/directories that do not contain "folder.jpg". I can find the... (2 Replies)
Discussion started by: subsonic
2 Replies
3. Shell Programming and Scripting
Hi All,
I am Oracle Apps Tech guy, I have a requirement to find 777 permission is there or not for all Folders and Sub-folders
Under APPL_TOP (Folder/directory) with below conditions
i) the directory names should start with xx..... (like xxau,xxcfi,xxcca...etc)
and exclude the directory... (11 Replies)
Discussion started by: gagan4599
11 Replies
4. Shell Programming and Scripting
Hi,
how to know the size of the files in the directory, exclusing the subfolder. ?
i tried du -h
du -sk
du -k
but its not giving.. (2 Replies)
Discussion started by: mail2sant
2 Replies
5. Shell Programming and Scripting
Hello,
I want to check if directories exist with a regex expression
dir1=/temp/local/*/home (exists on file system)
dir2=/temp/server/*/logs (does not exist on file system)
I want to check if there are any directories with the above regex
Code:
if ];then
echo "Directory... (4 Replies)
Discussion started by: gogineni
4 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
Using grep command, i want to find the pattern of text in all directories and sub-directories.
e.g: if i want to search for a pattern named "parmeter", i used the command
grep -i "param" ../*
is this correct? (1 Reply)
Discussion started by: vinothrajan55
1 Replies
7. Shell Programming and Scripting
I've looked at a few similar threads, but I can't bridge from those examples to what I'm working on, so I'm hoping someone can help.
I want to extend the following statement
find $PathToCheck -type f \( -not -iwholename "$ScriptDir/*" \) -exec md5sum "{}" \;>$NewSigs
to exclude several... (9 Replies)
Discussion started by: nixie
9 Replies
8. UNIX for Advanced & Expert Users
Hello,
i have multiple directories on my server. i need to find specific word like lets says for e.g IPV6 from those directories. can somebody tell me the right command which will let me to that? (8 Replies)
Discussion started by: Jared
8 Replies
9. Shell Programming and Scripting
I am trying to copy only the date specific folders/directories using the following command. However, the following copy command is also copying files from the root folder (OriginalFolder).
find /OriginalFolder/ -type -d \{ -mtime 1 -o -mtime 2 \ } -exec cp -R {} /CopyTo/'hostname'__CopyTo/ \;... (2 Replies)
Discussion started by: apacheLinux
2 Replies
10. Ubuntu
I have 2 directories,
/media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/
/media/andy/MAXTOR_SDB1/Linux_Files/.
I want to find which files are duplicates so I can delete them from one of those directories. (13 Replies)
Discussion started by: drew77
13 Replies
cssd(1M) System Administration Commands cssd(1M)
NAME
cssd - daemon which invokes and watches the CSs
SYNOPSIS
/usr/sbin/cssd [-f filename]
AVAILABILITY
SUNWjfpu
DESCRIPTION
cssd is the command which invokes and watches CS available in MLE (Multi Language Environment). After five seconds of the ending (includ-
ing abnormal termination) of a CS, cssd re-invokes the CS.
CS STARTING INFORMATION FILE
In a CS starting information file, /etc/css.conf by default, some CS starting information directories are described. This file can be cus-
tomized. cssd reads /etc/css.conf to get CS starting information directories, and then it invokes all executable files in the directories.
Usually, each CS itself is not placed in the directories and is invoked indirectly from a script in one of the directories.
CS STARTING SCRIPT
A CS starting script is located in a CS starting information directory. cssd reads all CS starting information directories in the sequence
specified in /etc/css.conf and finds to invoke all CS starting scripts. If two or more scripts which have the same filename are found,
cssd invokes only the first one.
UPDATING CS STARTING INFORMAION
When cssd receives signal SIGHUP , it re-reads /etc/css.conf and re-finds all CS starting scripts, and then restarts, starts or terminates
each script according to the following conditions.
A script whose modified time is changed (is to be restarted) A script which is newly added (is to be started) A script which is
deleted (is to be terminated)
TO TERMINATE
When cssd receives signal SIGTERM, it sends SIGTERM to each CS under the cssd's management and terminates itself (in general, each CS also
terminates with the signal).
ERROR INFORMATION
As a facility of daemon, cssd sends error information at level `err' , and invoke/re-invoke information at level `notice' to syslogd(1M).
OPTION
-f filenaSpecify a CS starting information file. Without this option, /etc/css.conf is used.
FILE
/etc/css.conf file for the information of CSs by default
SEE ALSO
css.conf(4), syslogd(1M)
BUGS
If a CS starting script is programmed so that itself is exec-ed by a CS, cssd understands that the process of the CS starting script is
terminated in spite of the CS's termination, and so puts syslog message out.
SunOS 5.10 10 Jan 2003 cssd(1M)