10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to multiply column1 and column3 data and need to compare it with column5. Need to check multiplication and Throw error if result is greater or less than column5 values, though difference of +/- 2 will be ok
Ex - if column1 has 2.4 and column3 has 3.5, it will be ok if column5 have value... (13 Replies)
Discussion started by: as7951
13 Replies
2. Shell Programming and Scripting
Hi ,
I tried the below code to remove the files older that 30 days .
#!/bin/ksh
set -x
file_path1="/home/etc"
file_path2="/home/hst"
file_nm="HST"
days=30
find $file_path1/*$file_nm* -type f -mtime +$days -exec rm -f {} \;
find $file_path2/*$file_nm* -type f -mtime +$days -exec rm... (3 Replies)
Discussion started by: smile689
3 Replies
3. Shell Programming and Scripting
Hi,
We have a shell script which looks into a directroy for any folder older than 30 days and removes them. The command being used is
find $ARCHIVE_DIR -type d -mtime +$PURGE_HIST_DAYS -exec rm -rf {} \;
It removes some folders but then throw below errors for others:
find:... (2 Replies)
Discussion started by: DejaVu
2 Replies
4. Shell Programming and Scripting
Hi folks,
I am trying a small script to delete a files from multiple servers having a common pattern.
I use this code
for i in `seq -w 25 100`
do
echo "************host server-name*********"
ssh -p 22022 server-name 'echo `hostname` && find /var/log -name "test*" ... (5 Replies)
Discussion started by: gauravsharma29
5 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement like i have to search a script and find names that conatins more than two dots, if so then throw error.
For ex: a1.b1.comname here i have to find comname and check two dots. it will not throw error
a1.b1.c1.comname here it contains more than 2dots it will throw... (3 Replies)
Discussion started by: swagat123
3 Replies
6. UNIX for Advanced & Expert Users
Executing "find /abc -follow -ls" the message "find: cycle detected for /abc/def/ghi/
What does this mean?
Thanks... (2 Replies)
Discussion started by: twk
2 Replies
7. UNIX for Dummies Questions & Answers
I want to count the number of lines in a file and store it in a variable if this count is zero i hv to throw an error ...is this syntax correct , but i am not getting the desired result
I am not using -s option here as i am concerned about record count not the size
#!/bin/ksh
set $count1... (4 Replies)
Discussion started by: mavesum
4 Replies
8. Shell Programming and Scripting
hi all,
in ksh, is there a way to throw a generic error message. i have lots of commands in my script and i didnt want to put
if ; then
doStuff();
else
print "an error occured, please run script again";
fi
around all the commands used. is there a way detect a command has... (1 Reply)
Discussion started by: cesarNZ
1 Replies
9. Shell Programming and Scripting
Guys,
I need to find all the files ending with either dmp or dmp.Z. This command is giving me error.
@files =`find $path \(-name "*.dmp" -o -name "*.dmp.Z"\) -mtime +30`;
sh: 0403-057 Syntax error at line 1 : `(' is not expected.
Thanks in advance (4 Replies)
Discussion started by: MKNENI
4 Replies
10. UNIX for Advanced & Expert Users
Can Anyone tell me how to write the Script to "find file(s) in a directory that is being accessed in last 5 minutes, and if there is result of that find, then throw the mail ".
Means throw the mail to a person regarding whoever and whenever a file is accessed in a directory.
ASAP.
Thnks. (2 Replies)
Discussion started by: varungupta
2 Replies
A2ENCONF(8) System Manager's Manual A2ENCONF(8)
NAME
a2enconf, a2disconf - enable or disable an apache2 configuration file
SYNOPSIS
a2enconf [ [-q|--quiet] configuration]
a2disconf [ [-q|--quiet] configuration]
DESCRIPTION
This manual page documents briefly the a2enconf and a2disconf commands.
a2enconf is a script that enables the specified configuration file within the apache2 configuration. It does this by creating symlinks
within /etc/apache2/conf-enabled. Likewise, a2disconf disables a specific configuration part by removing those symlinks. It is not an
error to enable a configuration which is already enabled, or to disable one which is already disabled.
Note that many configuration file may have a dependency to specific modules. Unlike module dependencies, these are not resolved automati-
cally. Configuration fragments stored in the conf-available directory are considered non-essential or being installed and manged by reverse
dependencies (e.g. web scripts).
OPTIONS
-q, --quiet
Don't show informative messages.
-m, --maintmode
Enables the maintainer mode, that is the program invocation is effectuated automatically by a maintainer script. This switch should
not be used by end users.
-p, --purge
When disabling a module, purge all traces of the module in the internal state data base.
EXIT STATUS
a2enconf and a2disconf exit with status 0 if all configurations are processed successfully, 1 if errors occur, 2 if an invalid option was
used.
EXAMPLES
a2enconf security
a2disconf charset
Enables Apache security directives stored in the security configuration files, and disables the charset configuration.
FILES
/etc/apache2/conf-available
Directory with files giving information on available configuration files.
/etc/apache2/conf-enabled
Directory with links to the files in conf-available for enabled configuration files.
SEE ALSO
apache2ctl(8), a2enmod(8), a2dismod(8).
AUTHOR
This manual page was written by Arno Toell <debian@toell.net> for the Debian GNU/Linux distribution, as it is a Debian-specific script with
the package.
14 February 2012 A2ENCONF(8)