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.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. AIX
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
3. Shell Programming and Scripting
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
4. Linux
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
5. Programming
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. Shell Programming and Scripting
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
7. Linux
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
8. Shell Programming and Scripting
what is the script to take files from ftp to unix server and unzipped the files (1 Reply)
Discussion started by: sunilamarnadh
1 Replies
9. Solaris
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
GFDF(1) GFDF(1)
NAME
gfdf - display disk free space of Gfarm file system
SYNOPSIS
gfdf [ options ]
DESCRIPTION
gfdf displays disk usage and free space of Gfarm file system.
OPTIONS
-a Displays only summary information of the Gfarm file system.
-h Displays numbers in human readable format by adding a prefix multiplier symbol like "M" (mega). Since this option uses powers of
1024, "M" means 1,048,576.
-H Displays numbers in human readable format by adding a prefix multiplier symbol like "M" (mega). Since this option uses powers of
1000, "M" means 1,000,000.
-n Displays hostnames of available Gfarm file system nodes.
-r Sort output in the reverse order.
-S Sort output in the increasing order of the available disk capacity.
-P path
Specifies a path name to specify a metadata server instead of the root metadata server. Note that this option is not effective with
the -a option.
-D domainname
Specifies a domain name of filesystem nodes to list the status of disk free space.
-? Displays a list of command options.
SEE ALSO
gfhost(1), gfarm2.conf(5)
Gfarm 30 December 2010 GFDF(1)