![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best possible communication mechanism between a Solaris machine and a windows machine | Krsh | SUN Solaris | 7 | 02-05-2009 10:41 AM |
| How to get free disk space size in C/C++ program( Solaris system) | yidu | High Level Programming | 4 | 01-30-2009 12:49 AM |
| command to find free disk space on solaris | harishankar | SUN Solaris | 2 | 08-26-2007 12:47 PM |
| How to re-allocate disk space on solaris 10 | duke0001 | UNIX for Advanced & Expert Users | 2 | 12-13-2006 11:14 AM |
| Disk space management on Solaris | HSN | SUN Solaris | 5 | 11-25-2006 07:31 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I have a question regarding finding free space on the disk of a solaris machine. Many mount points are available in my machine. Right now i am using df -b option to get the free disk space available. I have an assignment to check free space on the disk. I pass the directory as a parameter to my shell script. My shell script should read the parameter and check wether there is a sufficient space in the directory. my inputs can be any of the follwing /opt/Agent /var/tmp /var/opt/Agent /Agent I execued my command like this. sh checkspace.sh /var/tmp when the above command is executed i am getting correct result because /var/tmp exists on the machine. if i specify sh checkspace.sh /Agent the program halts with an error saying block device not found. this is because the directory is not existing. can any one please give a solution to find free disk space when inputs /Agent and /opt/Agent are specified . the code should be same for both inputs.(should also remember /Agent is not an existing directory) Thanks in advance RaghuDeep Amilineni Last edited by raghu.amilineni; 03-16-2009 at 05:13 AM.. |
|
||||
|
Did you check if directory exist first ?
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|