Search Results

Search: Posts Made By: shaal89
2,983
Posted By shaal89
ya.. it will list the files in date order.. but i...
ya.. it will list the files in date order.. but i hav to delete the files other than recently added 5 files.. (There should be only 5 files which are been recently added.. it should delete all the...
2,983
Posted By shaal89
how to delete the older files other than the recently added 5 files
Number of files will get created in a folder automatically daily.. so i hav to delete the older files other than the recently added 5 files..
Could u help me through this..??
4,000
Posted By shaal89
Cronjob is working now actually. But the problem...
Cronjob is working now actually. But the problem i got now is,
Actually while running the script tar1.sh as a cronjob, only the else part is running.
i.e
Directory size doesnt exceed Threshold...
4,000
Posted By shaal89
The permission is -rw-r--r-- 1 root root...
The permission is

-rw-r--r-- 1 root root 294 Feb 19 23:26 /ask/tarballs/tar1.sh
The cronjob results showed as below

/bin/sh: /ask/tarballs/tar1.sh: Permission denied
4,000
Posted By shaal89
Its showing You have new mail in...
Its showing
You have new mail in /var/spool/mail/root

But how to check that mail..??

And also the script hasn't ran at all.. coz it doesnt delete the file which is 30 days older

----------...
4,000
Posted By shaal89
My Cronjob is not running
I created a script,

size=`du -sm`
size=`echo $size | sed 's/.$//'`
size1='30720'
if [ $size -gt $size1 ]
then
{
find /ask/tarballs -type f -name "*.tgz" -mtime +30 -exec ls -l {} \;
find...
4,137
Posted By shaal89
36 . is the exact output for du -sm
36 .
is the exact output for du -sm
4,137
Posted By shaal89
actually.. size=`du -sh` size=`echo $size...
actually..

size=`du -sh`
size=`echo $size | sed 's/.$//'`
size1='30'
if [ $size -gt $size1 ]
then
echo "size greater"
else
echo "size smaller"
fi

This doesnt work for me..
After i...
4,137
Posted By shaal89
"you are using -h option, if your directory size...
"you are using -h option, if your directory size goes to 1 to 29 GB, then the above command will fail. Because you are checking it for MB and we are removing the human readable format in the end ( M...
4,137
Posted By shaal89
i changed the command to 'du -sm' so its...
i changed the command to 'du -sm' so its working..

"you are using -h option, if your directory size goes to 1 to 29 GB, then the above command will fail. Because you are checking it for MB and we...
4,137
Posted By shaal89
Yep.. Working !! Thank you
Yep.. Working !! Thank you
4,137
Posted By shaal89
My Script is, size='du -sh' $size ...
My Script is,
size='du -sh'
$size
size1='30M'
if [ $size -gt $size1 ]
then
echo "size greater"
else
echo "size smaller"
fi

its showing

36M .
size.sh: line 4: [: too many...
4,137
Posted By shaal89
How to compare if the size of the directory is more than 500MB in unix
I use du -sk command to find the size of the directory but when i use the result of 'du -sk' into if statement its throwing error.. Could u solve with this..?
4,630
Posted By shaal89
How to delete some of the files in the directory, if the directory size limits the specified size
To find the whole size of a particular directory i use "du -sk /dirname".. but after finding the direcory's size how do i make conditions like if the size of the dir is more than 1 GB i hav to delete...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 08:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy