Hi,
I'm quite new to scripting and need some help. I need to have one script that will check specific directories for files older than one month and then have the script delete them.
I have written the script below but it only does one directory. I don't quite know how to make it so it... (7 Replies)
Hi,
I want suggestion about user home directories, checking. how i could calculate this. I have 200 Users.
if home-dir-of-user1 > 250 MB -> print "OK"
fi
if home-dir-of-user1 > 500 MB > Print "Warning"
fi
if home-dir-of-user1 > 1000 MB > Print "Critical"
fi
Thanks,
Bash (4 Replies)
Using Solaris 10 and sh.
I have three files.
mydirs.txt
/dir1/dir2/dir3
/dir4/dir5/dir6
mydirshave.txt
1
2
mydirsshouldhave.txt
2
2
For each directory listed in mydirs.txt I should have the number of files equal to mydirshouldhave.txt. But using -ls |wc -l- on the dirs I get what... (2 Replies)
Hi Guys,
I wrote a code which checks for the text and directory. If the path is incorrect than it should echo that particular path not found. I can create a different if statments but I want to do this in just one if statment with the use of "or" (||). I have succssfully executed this code but now... (2 Replies)
Need help on below query asap. Thanks.
The below is the directory structure:
/home/suren
under /suren the following are the directories
/bin
/log
/error
/bin contains the following files
abc.txt
bcd.ksh
cde.sh
wer.ksh
ghi (file with out any extension)
/log contains the following... (1 Reply)
Hi,
My requirement is,there is a directory location like:
:camp/current/
In this location there can be different flat files that are generated in a single day with same header and the data will be different, differentiated by timestamp, so i need to verify how many files are generated... (10 Replies)
Hi,
I have one file as:
$cat file1
abc pqr 123
def wxy 234
xyz ghi 567
and another file as
$cat file2
345
456
987
I want the output of file2 to be appended in file1. And file 1 should look like:
$cat file1
abc pqr 123 345
def wxy 234 456
xyz ghi 567 987 (6 Replies)
Hello Folks,
Looking for a script which can keep doing ls to the directories and once file landed to the directory then ,read the files do further calculation and exit.
Kindly guide.
Regards,
Sadique (3 Replies)
I dont want to use for loop since it is using a lot of resources especially to a thousand files. Wanting to have a while? or something will find files that has been modifed or created yesteraday. View it. And search for soemthing and save it to a certain folder.
for i in `find ./ -mtime... (3 Replies)