Sponsored Content
Top Forums Shell Programming and Scripting Help needed with find command Post 302647403 by donadarsh on Monday 28th of May 2012 06:34:33 AM
Old 05-28-2012
remove the file named errorlog before entering to the loop.
try to give the full path of errorlog and check the errorlog in if condition with full path.
check for the existence or non-zero size of errorlog.

for zero file size checking - it will return true
Code:
if ! [ -s errorlog ]

for file name printing try -
Code:
 print `basename $NF`

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

help on find with chmod.. urgent help needed

Hello to all Unix gurus.. I am writing a generic script which takes the options of unix command as input and concatenate all the pieces and forms a complete executable command. I am getting an error with the following command as I am resetting my own permission on the root directory. When the... (4 Replies)
Discussion started by: sdlayeeq
4 Replies

2. UNIX for Dummies Questions & Answers

Find and Replace code help needed

I have a file "dbshot.xml" that contains lines that need replacing in a batch format but the parameters are based on two lines. Ex. <role roletype="01"> <status>1 needs to be changed to <role roletype="01"> <status>0 I can't use simply "<status>1" replace since the... (2 Replies)
Discussion started by: E Orgill
2 Replies

3. UNIX for Dummies Questions & Answers

Find and Remove help needed!!!!

thank you for the help. (1 Reply)
Discussion started by: scooter17
1 Replies

4. UNIX for Dummies Questions & Answers

FIND and REMOVE HELP NEEDED!!!

Hello, I am aware of that Find command finds certain files and remove command removes certain files. However, is there a way to Find certain DIRECTORY and remove that DIRECTORY? thank you (3 Replies)
Discussion started by: scooter17
3 Replies

5. Shell Programming and Scripting

find explantion needed

Dear Experts, please can any body help me to explain the below commants in detail what exactly its doing what we mean by -mtime +2 and -exec and rm{}; find /home/data/ab.200* -mtime +2 -exec rm {} \; Regards, SHARY (3 Replies)
Discussion started by: shary
3 Replies

6. UNIX for Dummies Questions & Answers

Help needed with find command

Hi Guys, Can someone help with this. I have to find out a file name which calls the following sql script "abhishek_to_sdw.sql". In other words it contains a pattern like "abhishek_to_sdw.sql". I have found out using "find" command that the file abhishek_to_sdw.sql is existing on the... (4 Replies)
Discussion started by: max29583
4 Replies

7. UNIX for Dummies Questions & Answers

Help needed with find command

Hi, I'm a complete noobie at UNIX and have hit a problem. I'm using the 'Talend' ETL tool to try and extract flat files from UNIX on a weekly basis. The dates are maintained in a control table and the appropriate folder has been mounted. I am using a component in 'Talend' which enable... (1 Reply)
Discussion started by: markee
1 Replies

8. UNIX for Dummies Questions & Answers

find/mail help needed

so I saved a mail message of mine to a new dir/file My question is how do I find the path to my file containing my saved email from my home dir prompt in unix? Thanks. (1 Reply)
Discussion started by: drew211
1 Replies

9. UNIX for Dummies Questions & Answers

find with prune option help needed

Hello, I am using ksh93 (/usr/dt/bin/dtksh) on Solaris and am stuck when trying to use find with the -prune option. I need to search a directory (supplied in a variable) for files matching a certain pattern, but ignore any sub-directories. I have tried: find ${full_path_to_dir_to_search}... (9 Replies)
Discussion started by: gary_w
9 Replies

10. UNIX for Dummies Questions & Answers

Help needed - find command for recursive search

Hi All I have a requirement to find the file that are most latest to be modified in each directory. Can somebody help with the command please? E.g of the problem. The directory A is having sub directory which are having subdirectory an so on. I need a command which will find the... (2 Replies)
Discussion started by: sudeep.id
2 Replies
elcsd.conf(5)							File Formats Manual						     elcsd.conf(5)

Name
       elcsd.conf - error logging configuration file

Description
       The  file  contains information used by the daemon to configure error logging for the system.  The system manager maintains this file.  The
       error logging daemon is dependent on the current order of the entries in the file.  Do not change the order.

       The information in the file shows any defaults and describes what you can enter.  A newline is used to delimit each entry in  the  file,  a
       null entry consists of a newline alone, and comments begin with #.
       #
       #    elcsd - errlog configuration file
       #

       {	   # delimiter DON'T remove or comment out!
       1	   # status 1-local,2-logrem,4-remlog,5-remlog+priloglocal
		   # errlog file size limit num. of blocks
       /usr/adm/syserr # errlog dir. path
		   # backup errlog dir. path
       /	   # single user errlog dir. path
       /usr/adm/syserr # log remote hosts errlog dir. path
		   # remote hostname to log to
       }	   # delimiter DON'T remove or comment out!
       #  hosts to log :S - separate file or :R - remotes file (together)
       remote1:S
       remote2:S
       #remote3:S	   # disabled
       remote4:S
	  .
	  .
	  .
       The status line of the file describes where you can log error packets, also called error messages:

	    Logs error packets locally =
		   1, the default.

	    Logs error packets from a remote system or systems to the local machine =
		   2.

	    Logs local and remote error packets locally =
		   3.

	    Logs error packets from the local system to a remote system =
		   4.

	    Logs error packets from the local system remotely and logs high
		   priority messages locally = 5.

       The  errorlog  file  size  defines  the	maximum size of an errorlog file.  If disk space is limited, you can specify the maximum number of
       blocks (512 bytes each) you want the errorlog file to be.  If you do not specify the maximum number of blocks, the system will  notify  you
       when the file system is 98% full.

       The  default  errorlog  directory path is You can direct error packets to a different directory; if you do, you must change the default for
       also. For further information, see

       If the error-logging daemon cannot write to the primary errorlog directory path, it attempts to log to the backup errorlog  directory  path
       automatically.

       The  root  directory  is  the default for the single-user errorlog directory path.  When the system makes the transition to multiuser mode,
       errors logged in single-user mode are transferred to the default errorlog directory path  You  can  direct  single-user	error  packets	to
       another directory.

       To log error packets from a remote system locally, set up an errorlog directory path on the local system.  The default is

       Errorlog  packets  from	remote systems can be logged to separate files or to one file.	S sets up a separate errorlog file for each remote
       system that logs locally.  R logs packets from the corresponding remote system to the file syserr.remotes.  The default is S.

Restrictions
       You must have superuser privileges to change the file.  However, anyone can view the file.

Files
       elcsd daemon messages

See Also
       elcsd(8), eli(8), uerf(8)
       Guide to the Error Logger System

																     elcsd.conf(5)
All times are GMT -4. The time now is 07:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy