I am logging the output of bdf command to a file called /tmp/bdfoutput in HPUX server. I want a mail to be sent at 11.55 PM everyday and then the file needs to be rolled over as /tmp/bdfoutput.1 , /tmp/bdfoutput.2 ....etc and the new file has to be created.
create a cron script that goes off at 23:55 every day that does the following:
1. get the highest numbered /tmp/bdfoutput.# file. I'm sure there are plenty of ways here's one off the top of my head:
Note: in the 'ls -1' command that is "one" not "ell" as the option.
Should leave you with just the number in $FNUM
2. use mailx to send out /tmp/bdfoutput as the body of the mail message
to your recipient(s).
and then
Note2: If you write this as a cron script, make sure to fully qualify the paths to non built-in commands,
and don't have any debugging output in your final version that cron will use.
Last edited by rwuerth; 01-27-2009 at 07:14 PM..
Reason: added 'Note' and 'Note2'
The sendmail on hp site is too old,and still support the bugged ssl3(poodle) even if enable tlsv1.
So i decide to compile sendmail by myself
i use this site.config.m4
define(`confCClibsmi', `gcc -fPIC')
define(`confCC',`/usr/local/bin/gcc -fPIC')
define(`confOPTIMIZE', ` -O3')... (0 Replies)
I used to use ls -l cut to detrmine file size, and google searches didn't come up with anything else but 'stat' which doesn't appear on HPUX.
I discovered the humble 'wc -c' which does this job very neatly, and thought I would share it. (7 Replies)
Hi,
In solaris I remember this direcotry structure
/proc/<pid>/fd
in this directory
ls -l | wc -l would give me the number of file descriptor for that process.
Where can I find the similar in HPUX (11 Replies)
I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email.
original solaris... (2 Replies)
Hi All,
Am trying to get a command which gives the "date + time" that a file was edited.
I cant use "ls -l" because it fails to get me the "time stamp" of files that were edited more than 6 months ago...commands like "stat" "ctime" etc aren't available on my server and I can't install them... (12 Replies)
Hi guys,
what is the relation between I/O performance and file systems.
I have a file systems called /dcs/data01 which is having 4Tb size.
According our application we can split the file system like
dcs/data01 -> 1Tb
dcs/data02 -> 1Tb
dcs/data03 -> 1Tb
dcs/data04 -> 1Tb
do you... (4 Replies)
why is that I need to go to /usr/sbin> in order to run send mail
how can I run sendmail where ever folder I'm in...
e.g. like
/stuff/games/sendmail
ksh: sendmail: not found (7 Replies)
I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas? (2 Replies)
Hi,
I am working on HPUX 11.11i and 11.10 boxes. My default shell is ksh.
I have the following entry in my profile file
HOSTNAME=`uname -n`
Every time I login to the server, this is the error I get:
${HOME:-.}/.profile: syntax error: `)' unexpected
The line number shown... (1 Reply)
Hi All,
has anyone found any document file reader for HPUX? I have been finding myself in trouble without having one.. if there is nothing that exist, I am thinking of developing one of my own through C, Not being a professional C programmer, I need to have a good start.. can someone please throw... (0 Replies)