11-13-2007
Hi Porter,
The output of
root@WiMAX-BS:/var/log ls -ld /var/log/messages
-rw------- 1 root root 41994 Jan 23 03:16 /var/log/messages
==========
Well.. I was thinking like
1) use the ls command grab the size value using the sed and
2) then if it is greater than 128KB, do an echo " " > /var/log/messages
Now I've crond support, so I can add a script with above logic to cron job.
Thanks
Jay
10 More Discussions You Might Find Interesting
1. HP-UX
Hi,
I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory.
Thanks in advance.
Mike (3 Replies)
Discussion started by: Mike1234
3 Replies
2. Shell Programming and Scripting
hi All,
cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'
Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies
3. Shell Programming and Scripting
Hi experts
I want your help to change the file format to my wanted version, please give me a hand thanks
$cat file
install pass
make os pass
make build kernel failed
usb storage pass
chane to
| *install* | *make os* | *make build kernel* | *usb storage* |
| pass | pass... (7 Replies)
Discussion started by: yanglei_fage
7 Replies
4. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
5. Shell Programming and Scripting
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Discussion started by: timmywong
8 Replies
6. SuSE
mail:/var/lib/named/proc # ls -l |grep kcore
-r-------- 1 root root 140737486266368 Jun 3 19:47 kcore
mail:/var/lib/named/proc # du -a |grep kcore
0 ./kcore
System is SuSE 11.2 SP1.
The system appears to run correctly, and the output of df -v shows the correct disk... (1 Reply)
Discussion started by: jgt
1 Replies
7. Shell Programming and Scripting
Hi all.
I have a .txt file that I need to sort it
My file is like:
1- 88 chain0 MASTER (FF-TE) FFFF 1962510 /TCK T FD2TQHVTT1 /jtagc/jtag_instreg/updateinstr_reg_1 dff1 (TI,SO)
2- ... (10 Replies)
Discussion started by: Behrouzx77
10 Replies
8. UNIX for Dummies Questions & Answers
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
9. Shell Programming and Scripting
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
10. AIX
Hi 2 all,
i have had AIX 7.2
:/# /usr/IBMAHS/bin/apachectl -v
Server version: Apache/2.4.12 (Unix)
Server built: May 25 2015 04:58:27
:/#:/# /usr/IBMAHS/bin/apachectl -M
Loaded Modules:
core_module (static)
so_module (static)
http_module (static)
mpm_worker_module (static)
... (3 Replies)
Discussion started by: penchev
3 Replies
LEARN ABOUT CENTOS
pmdarsyslog
PMDARSYSLOG(1) Performance Co-Pilot PMDARSYSLOG(1)
NAME
pmdarsyslog - rsyslog (reliable and extended syslog) PMDA
DESCRIPTION
pmdarsyslog is a Performance Metrics Domain Agent (PMDA) which exports metric values from the rsyslogd(8) server. Further details about
rsyslog can be found at http://www.rsyslog.com/.
INSTALLATION
If you want access to the names and values for the rsyslog performance metrics, do the following as root:
# cd $PCP_PMDAS_DIR/rsyslog
# ./Install
If you want to undo the installation, do the following as root:
# cd $PCP_PMDAS_DIR/rsyslog
# ./Remove
pmdarsyslog is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent is
installed or removed.
In order to use this agent, rsyslog stats gathering must be enabled. This is done by adding the lines:
$ModLoad impstats
$PStatsInterval 5 # log every 5 seconds
syslog.info |/var/log/pcp/rsyslog/stats
to your rsyslog.conf(5) configuration file after installing the PMDA. Take care to ensure the syslog.info messages do not get logged in
any other file, as this could unexpectedly fill your filesystem. Syntax useful for this is syslog.!=info for explicitly excluding these.
FILES
/var/log/pcp/rsyslog/stats
named pipe containing statistics exported from rsyslog, usually created by the PMDA Install script.
$PCP_PMDAS_DIR/rsyslog/Install
installation script for the pmdarsyslog agent
$PCP_PMDAS_DIR/rsyslog/Remove
undo installation script for the pmdarsyslog agent
$PCP_LOG_DIR/pmcd/rsyslog.log
default log file for error messages from pmdarsyslog
SEE ALSO
pmcd(1), rsyslog.conf(5), rsyslogd(8).
3.8.10 Performance Co-Pilot PMDARSYSLOG(1)