I need help immediately. Please help me


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers I need help immediately. Please help me
# 1  
Old 07-23-2007
To find the disk space capacity

Hi Everyone,


I am writing a script, in that i want to find out whether my disk space usage capacity extends more than 98%. If my disk space capacity extends more than 98% i want to print that the space capacity is running out of space otherwise i want to print only the capacity of the space used.

df -k | awk '($5 >= "98%") {print $6 "is running out of space " $5}'

can any one tell me whether the above statement is correct and also please correct the above statement accordingly to my requirement. i am very new to Unix and i do no how to use the if else commmand in the awk command and also i do no whether we can able to compare the value in percentage

Kindly please help me on this.

Thanks in advance.
# 2  
Old 07-24-2007
I need help immediately. Please help me

Hi Everyone,

I am very new to unix.

I am writing a script, in that i want to find out whether my mount(/apps/documentum/dba) space usage capacity extends more than 98%. If my mount space capacity extends more than 98% i want to print that the space capacity is running out of space otherwise i want to print only the capacity of the space used.

df -k | awk '($5 >= "98%") {print $6 "is running out of space " $5}'

can any one tell me whether the above statement is correct and also please correct the above statement accordingly to my requirement. I do no how to use the if else commmand in the awk command and also i do no whether we can able to compare the value in percentage

Kindly please help me on this.

Thanks in advance.
# 3  
Old 07-24-2007
Please stick to the rules. Do not bump your posts.

I have merged both the posts.
# 4  
Old 07-24-2007
I don't want to be rude here but haven't you already tried this on your *nix box
or did you just made up this command while writing out this post.

And you should read the forum faq before posting.(No pleading!!!)

Here is the command you are looking for.
df -k | awk ' { if ($1 == "/apps/documentum/dba") {du=substr($5,1,index($5,"%")); if(du >= 98) {print $6 "is running out of space " $5 } } }'

Tinker it to your needs.

Ravinandan
# 5  
Old 07-26-2007
Hi Ravinandan

Thank you for your timely help!!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Nohup immediately stops.

I try and start a short script nohup the nohup immediately stops. Here's the code #!/bin/sh rm backup.out for i in `cat /home/xxxxx/Allservers.txt` do echo "Logging onto $i" ssh -qt $i '/usr/local/bin/sudo "/src/bkupsa"' done >>backup.out Any ideas? (3 Replies)
Discussion started by: ekrause77
3 Replies

2. Shell Programming and Scripting

please tell immediately

what is the script to take files from ftp to unix server and unzipped the files (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

3. Linux

at scheduling executes job immediately

Hi all, I am trying to schedule a one time job using at. First I do a `date` command to capture current date $ date Fri Aug 8 15:53:20 # shows current date $ at -t 16:00 today #schedule command to run at 4pm at> command1 at> <EOT> #after pressing Crtl D job 6 at 2008-08-08 15:53 and... (1 Reply)
Discussion started by: new2ss
1 Replies

4. Shell Programming and Scripting

To find a character immediately following a specified String

Hello, I have a UNIX file in which data is like this -- ISA*00* *00* *01*006415160 *01*137361242 ... (3 Replies)
Discussion started by: The Observer
3 Replies

5. Programming

Experts !!! I Need HELP immediately..!

HI, I am getting the error : ErrCode:-2 Message:Application Initialisation function Err Params:Could not Load SO/DLL Nothing specific is coming, just the above error. Can anyone tell me how to debug this error. Thanks. (3 Replies)
Discussion started by: amol_helwatkar
3 Replies

6. Linux

please help immediately

how can i check if the size of my file is greater than 5MB and if it is so then how can I direct my data to another new file. the data will be in the form of SQL query (4 Replies)
Discussion started by: infyanurag
4 Replies

7. Shell Programming and Scripting

Please respond immediately

Hi ..please tell me how to modinfy an existing file in a directory, i need commands like to open edit and save n execute the file in BASH. please respond immediately (3 Replies)
Discussion started by: deepti.1104
3 Replies

8. AIX

UIDs being overwritten immediately

We have a problem where we delete a user and their associated UID gets dumped back in the UID pool. The if we immediately create a another (new) user, AIX reuses the last UID, the one that was just released. This is causing a problem when reports are being generated because the new users name is... (2 Replies)
Discussion started by: xsys2000
2 Replies

9. Shell Programming and Scripting

Need a Shell Program immediately

Hi Friends, I need a simple shell script(Linux..bash shell) for the below description. Can anyone help me please. I need it very urgently. That is why i cannot write it myself. Objective Create shell scripts using: · Simple interactive menus · Variables, functions Description Create a... (4 Replies)
Discussion started by: praji
4 Replies
Login or Register to Ask a Question