Still trying to get the basics down and I would like a different solution to what I'm currently doing and a better understanding of why it's happening. I've written a simple backup script that tars individual directories and then dumps them to a NFS drive. STDERR is being dumped into a process which echos a date stamp, and then the error to a tmp file (/tmp/backerrors.log). At the end of the script you will see I am mailing the tmp file if it has any data in it, after which I call for it to remove the file. Now here is where I get confused. Before the mail command is finished, the file is getting removed and cutting off bits of the message body.
If you run something like this, you will see what I mean (for me, the last line is being removed before the mail command is finished):
Here is my script, at the end of which I've given it a 5 second sleep to complete the mail command. This can't be the correct way of doing, I assume..
Hello,
does anyone have a script that can check the contents of the /tmp directory and for example e-mail the directory content if anything other than session files are present?
Maybe there are better ways to monitor suspicous /tmp and /var/tmp activity, if so I'm listening :) (1 Reply)
I'm new in Solaris server
After the system support reboot the Solaris server, all the files in /tmp has been removed, is that normal under Solaris or under different init level will get different result?
which init level will do that? (5 Replies)
Hi all,
How can I quickly show Nth line from the huge file(at least more than 15GB)? I used the following script but seems slower.
See 2717298 th line.
head -2717298 data0802.dat | tail -1
Thank you very much (4 Replies)
Write a nawk script that will produce the following report:
***FIRST QUARTERLY REPORT***
***CAMPAIGN 2004 CONTRIBUTIONS***
-------------------------------------------------------------------------
NAME PHONE Jan | ... (5 Replies)
Hi all,
I am writing a shell script for processing files in a directory.
I need to read files in the directory and process them and write it to another file.
For example, if the directory contains the following files,
file1,file2,file3
I want to process these files and create... (3 Replies)
Hi,
I would like to know if /tmp file system is full, wheather it will affect the peformance of application installed on AIX. if Memory and CPU are not heavily utilized.
Regards,
Manoj. (1 Reply)
The script written by csh, when it running it make some tmp file, the process need to read the tmp file to complete but tmp unable to open, don't have permission. Anyone know the way to automatic chmod the tmp file when run process. (2 Replies)
Hi Guys
Recently we have a issue where the core file under /tmp grows and there by /tmp becomes 100% full in our HP unix server.
Any ideas or suggestions about how we can resolve this. (3 Replies)
I have big files (some are >300GB!) that need substitution for some patterns, for example, change Multiple Spaces into Tab. I used this oneliner:sed '1,18s/ \{1,\}/\t/g' infile_big.sam > outfile_big.sambut it seems very slow as the job is still running after 24 hours! In this example, only the... (8 Replies)