Hello
I am aware of the "trap" command to trap various signals.
I am running a shell script as a daemon. In case this daemon crashes for some reason, I wish to trap the relevant signal and echo some information into a file.
Which signal do I need to trap when my daemon simply crashes...
As an addendum to the above post,
if yo cron job is generating errors/output that you can safely ignore, then you can change the redirection of output and errors to /dev/null .
When setting up a cron job, it is good practice to redirect output and errors to different files. Ideally these...
gfunk123
A cron job sends only errorsto the mailbox. So, if yo mailbox id filling up, then yo cron job may be generating errors mate.
Redirect output and error to separate files and check them after cron job is executed.
something like...
10 10 * * * $HOME/somescript.sh > $HOME/somescript.log...
Check your /etc/passwd file.
You may have an entry for the anonymous ftp user like the one below:
============
ftp:*:9922:90:Anonymous FTP::
============
Remove the above line and add a new user to the system. The new user can be used for FTP....or any other existing user can be used.
As an addendum to the above post,
The command 'set -o noglob' turns off globbing (file name generation).
The command 'set +o noglob' turns on globbing.
For more details, refer to 'man set'
Hope this helps ya.
Chrissirhc
Can you please list the output of the `ls -lt | grep PDF` command ? Also, which shell are you using ? If you are using the ksh shell, then your noglob option must be turned on.
Try using `set +o noglob` and then re-execute your commands above.
Hope this helps ya.
navink123
Let's assume that your input files that are generated daily (eg. abc20030826123) are stored in a directory called /dailydata.
If your shell script needs to refer to a file generated in /dailydata on that day, then use the following in your shell script :
============================...
marsd
I have worked on Applications such as CONNECT DIRECT and XFB.CFT for doing FTP stuff. These applications provide secure FTP and good error-trapping.
However, for certain reasons, I was asked to use a shell script and hence I wanted to know if there're any error trapping mechanisms in...
Hi
If I try to ftp an invalid IP address, I get no result (which is obvious) and the command seems to be hanging.
HOW DO I TRAP THIS KIND OF ERROR ?
For eg., I am using FTP in a "here" document within a shell script. If the remote system isn't available or if there is a network...
As per your example, if you have files with names like filename[1].jpg and you want to strip off the '[1]', then you can try the following script :
=========================
#!/bin/ksh
for i in `ls *\[*\].jpg`
do
mv $i `echo ${i%%\[*\]*}.jpg`
done
==========================
Hope this helps ya !
To remove files older than 5 days, you can run the following command in the directory containing the files to be removed :
find . -type f -mtime +5 | xargs rm -f
Hello
I am trying to connect to my company's VPN via DSL.
I'm using the Avaya VPN Remote Client (Windows 2000 Pro).
When I try to connect to my VPN, I get the following errors:
VPNremote is unable to contact it's Virtual Adapter. It can not continue. See More Details for troubleshooting.
More...
Chrissirhc,
A .tar file is an archive file and a .Z file is a compressed file.
The 'zcat' command is used to print out the contents of a compresed text file.
The 'tar tvf' command lists the contents of a TAR archive.
So, keeping the above in mind, what do you wanna do ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.