need clarification of the script:urgent
#!/bin/bash
pal1=`find /usr/local/ -type f -name messages.1.gz |wc -l` find /usr/local/ -type f -name messages.1.gz -exec rm {} \; |
Hi,
This sounds like homework... and the urgent in the title doesn't help your case :) I will not explain in detail. I will only give you the necessary information to piece it together yourself. Here goes : Code:
$ man find the | symbol redirects the output of the first command to the second (in your case : the output of find to wc ). pal1= is a variable assignment. ` ..... ` excutes ..... and returns the return value. I'd recommend some reading about bash programming. Serafean |
you are rite
actually i had a requirement to remove 1 hour old files from the location /usr/var/messages and need to keep that removed files in a different file as back up and there is an exciting script running for this job. unfortunately am not much aware of the shell scripting so couldnt figure out. can you please help me out |
Quote:
Serafean |
All times are GMT -5. The time now is 12:12 AM. |