09-17-2001
Directory find in small and capitals
I've a very trivial thing bothering me. I'm rather new in scripting so I'll keep asking stupid questions.
Here is small script that does backup of mails.
---
for i in `cat /maildir.dir`
do
echo $i
maildir=`echo $i|sed 's@^./usr/@@'`
for j in $i/*
do
[ -d "$j/backup" ] && {
st="`find $j/backup -name "[0-9]*" -type f -print|head -1|wc -l`"
.....
It searches for mails in backup folder of all the users. Once in a while a user will use capital letters ('BACKUP' or 'Backup') in the name. How do I make sure that all sorts of such names must be included in my backup thingy?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem.
so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to find this string 'preparing string IBE_Quote_W1_Pvt.SaveWrapper for quote_header_id’ in my Apache log file directory. The log file that contains this string may be in a parent direcotry or a sub-directory. I have tried 'grep' and 'awk' with no success.
I would like to get the path... (3 Replies)
Discussion started by: gross
3 Replies
3. Shell Programming and Scripting
Hello community,
I got it all done except for one thing,
] or ]
So now I want to split those in to
]
or
]
I am not so good at all this and get stuck with
sed -e 's// &/g' -e 's/.../ &/g' -e 's/^ //g' infile (11 Replies)
Discussion started by: externalaw
11 Replies
4. Shell Programming and Scripting
Hey All,
New to Bash Scripting I have a find command to count the current directories it is:
dirCount=`find $2/ -type d | wc -l`
What I get is a count of all directories in $2 as well as $2 itself.
What I need to do is ignore $2 itself and just get the folders inside $2.
Thank in... (6 Replies)
Discussion started by: brandonpal
6 Replies
5. UNIX for Advanced & Expert Users
I am looking for the directory ".Private". Can someone tell me why my first search does not work?
~ $ sudo find / -iname -type d ".Private" 2>/dev/null
And why does this one work?
~ $ sudo find / -type d -iname '.Private' 2>/dev/null... (3 Replies)
Discussion started by: cokedude
3 Replies
6. Shell Programming and Scripting
Have a textfile (regular updated) with informations about datafiles .
Each line is describing a datafile. Now I am trying to delete several specific lines in this textfile, which are defined before in a kind of removal list.
Can not find the mistake I have done in the script because in the... (5 Replies)
Discussion started by: jurgen
5 Replies
7. UNIX for Dummies Questions & Answers
Hi
I wish to find only files in dir /srv/container/content/imz06/. It means exclude subfolder /srv/container/content/imz06/archive/
> uname -a
SunOS testbox6 5.10 Generic_139555-08 sun4v sparc SUNW,Sun-Blade-T6320Its Solaris default "find"
> find /srv/container/content/imz06/* -name... (4 Replies)
Discussion started by: slashdotweenie
4 Replies
8. Shell Programming and Scripting
I only want to find files under each branch of the directory tree inside directories named XYZ and there are multiple XYZ directories? (7 Replies)
Discussion started by: emc^24sho
7 Replies
9. Shell Programming and Scripting
Hello, I have a file containing different words. How can i print the words which contain at least one small letter, for example if i have:
today TOMORROw 12345 123a
next preViou5 no
it should print the following:
today TOMORROw 123a
next preViou5 no
Please use code tags as required... (5 Replies)
Discussion started by: JhonTheNewbie
5 Replies
10. UNIX for Beginners Questions & Answers
How to get a file 'zlib.h' in an entire directory with an excluded directory specified lives under that starting directory by using find command, as it failed on:
$ find . -name 'zlib.h' -a -ipath 'CHROME.TMP' -prune -o -print
it'll just list entirely up (2 Replies)
Discussion started by: abdulbadii
2 Replies
MANPATH(5) /etc/manpath.config MANPATH(5)
NAME
manpath - format of the /etc/manpath.config file
DESCRIPTION
The manpath configuration file is used by the manual page utilities to assess users' manpaths at run time, to indicate which manual page
hierarchies (manpaths) are to be treated as system hierarchies and to assign them directories to be used for storing cat files.
If the environment variable $MANPATH is already set, the information contained within /etc/manpath.config will not override it.
FORMAT
The following field types are currently recognised:
# comment
Blank lines or those beginning with a # will be treated as comments and ignored.
MANDATORY_MANPATH manpath_element
Lines of this form indicate manpaths that every automatically generated $MANPATH should contain. This will typically include
/usr/man.
MANPATH_MAP path_element manpath_element
Lines of this form set up $PATH to $MANPATH mappings. For each path_element found in the user's $PATH, manpath_element will be
added to the $MANPATH.
MANDB_MAP manpath_element [ catpath_element ]
Lines of this form indicate which manpaths are to be treated as system manpaths, and optionally where their cat files should be
stored. This field type is particularly important if man is a setuid program, as (when in the system configuration file /etc/man-
path.config rather than the per-user configuration file .manpath) it indicates which manual page hierarchies to access as the setuid
user and which as the invoking user.
The system manual page hierarchies are usually those stored under /usr such as /usr/man, /usr/local/man and /usr/X11R6/man.
If cat pages from a particular manpath_element are not to be stored or are to be stored in the traditional location, catpath_element
may be omitted.
Traditional cat placement would be impossible for read only mounted manual page hierarchies and because of this it is possible to
specify any valid directory hierarchy for their storage. To observe the Linux FSSTND the keyword `FSSTND can be used in place of an
actual directory.
Unfortunately, it is necessary to specify all system man tree paths, including alternate operating system paths such as /usr/man/sun
and any NLS locale paths such as /usr/man/de_DE.88591.
As the information is parsed line by line in the order written, it is necessary for any manpath that is a sub-hierarchy of another
hierarchy to be listed first, otherwise an incorrect match will be made. An example is that /usr/man/de_DE.88591 must come before
/usr/man.
DEFINE key value
Lines of this form define miscellaneous configuration variables; see the default configuration file for those variables used by the
manual pager utilities. They include default paths to various programs (such as grep and tbl), and default sets of arguments to
those programs.
NOCACHE
This flag prevents man(1) from creating cat pages automatically.
BUGS
Unless the rules above are followed and observed precisely, the manual pager utilities will not function as desired. The rules are overly
complicated.
2.5.2 2008-05-05 MANPATH(5)