![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to delete line with matching text and line immediately after | orahi001 | UNIX for Dummies Questions & Answers | 6 | 01-15-2008 12:34 AM |
| please help immediately | infyanurag | Linux | 4 | 11-02-2007 10:06 AM |
| Please respond immediately | deepti.1104 | Shell Programming and Scripting | 3 | 08-31-2007 03:01 AM |
| UIDs being overwritten immediately | xsys2000 | AIX | 2 | 05-08-2007 02:00 PM |
| Need a Shell Program immediately | praji | Shell Programming and Scripting | 4 | 01-22-2002 04:09 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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. |
|
||||
|
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. |
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|