df command on Linux and Solaris


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers df command on Linux and Solaris
# 1  
Old 04-04-2003
Computer df command on Linux and Solaris

Hello all,

Does anyone know how to fix this? My directory is mounted from a Soalris Server and both Solaris and Linux Client are mountting my directory. But when I use df and awk together the reset are different on the platform.

under Solaris clinet I get whant I want:

df -k $MY_HOME/storage/space2|awk '{print $4" "$5}'

avail capacity
380199 88%


under Redhat Linux I get:

df -k $MY_HOME/storage/space2|awk '{print $4 " " $5}'
Available Use%
### blank line####
88% /home/larry

It seems that under Linux the mount point if it is long will take up the new line and when awk gets the arguments it takes it as another line.

THANKS
# 2  
Old 04-11-2003
Well I got the answer I need. I needed to use the -P flag.

Thanks all
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies

2. Shell Programming and Scripting

Find command works on Linux but fails on Solaris.

Hi, I am looking for a generic find command that works on both Linux and Solaris. I have the below command that works fine on Linux but fails on solaris.find /web/config -type f '(' -name '*.txt' -or -name '*.xml' -name '*.pro' ')' Fails on SunOS mysolaris 5.10 Generic_150400-61 sun4v sparc... (1 Reply)
Discussion started by: mohtashims
1 Replies

3. Shell Programming and Scripting

Need Generic command for Memory usuage on Linux and Solaris

Hi, I m using the below commands to find out the RAM and SWAP Memory usage on Linux. free -m while I m using the below for Solaris prstat -cZ 1 1 Is there a generic command that I can used for both Linux and Solaris to get RAM and SWAP memory usage ? (3 Replies)
Discussion started by: mohtashims
3 Replies

4. Shell Programming and Scripting

Issue with awk command between Linux and Solaris

Hi, Here is the output using bash profile on Linux uptime 04:59:14 up 16 days, 4:48, 2 users, load average: 1.00, 1.00, 1.20 Here is the output using bash profile on Solaris uptime 4:00am up 84 day(s), 22:21, 3 users, load average: 0.09, 0.10, 0.12 Now,... (4 Replies)
Discussion started by: mohtashims
4 Replies

5. Programming

Linux/Solaris System Administrator to become a Linux/Solaris System Programmer?

Hi all What is the qualification required by Linux/Solaris System Administrator to become a Linux/Solaris System Programmer as to gain complete knowledge on computers. Thanks (1 Reply)
Discussion started by: Tlogine
1 Replies

6. UNIX for Dummies Questions & Answers

Help on ps tree listing command - Linux/Solaris

Hi all, Can any guru please help on how I can tweak the following ps command so that it only shows the lines that I wanted. $ command ps -HAcl -F S -A f F S UID PID PPID CLS PRI ADDR SZ WCHAN RSS PSR STIME TTY TIME CMD 4 S root 1 0 TS 24 - 2592 ? ... (3 Replies)
Discussion started by: newbie_01
3 Replies

7. UNIX for Advanced & Expert Users

Linux column(1) from util-linux-ng for Solaris? Which *.pkg to install?

Hi On Linux systems there is a command called "column". column - columnate lists Synopsis column -tx] -c columns] -s sep] file ...] Description The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or,... (3 Replies)
Discussion started by: slashdotweenie
3 Replies

8. Shell Programming and Scripting

Shell script runs fine in Solaris, in Linux hangs at wait command

HI, I have a strange problem. A shell script that runs fine on solaris. when i ported to linux, it started hanging. here is the core of the script CFG_FILE=tab25.cfg sort -t "!" -k 2 ${CFG_FILE} | egrep -v "^#|^$" | while IFS="!" read a b c do #echo "jobs output" #jobs #echo "jobs... (13 Replies)
Discussion started by: aksaravanan
13 Replies

9. Solaris

solaris equivalent to the linux screen command

hi there is there a solaris equivalent to the linux screen command? (1 Reply)
Discussion started by: milhan
1 Replies

10. Linux

df command in linux vs. Solaris

We run both linux and Solaris where I work. We have a shell script that gives hard disk information on Solaris drives. Part of it executes the following command: df -l -t -k I need to know the equivalent in Linux in order to rewrite this script. I belive the options are different for... (2 Replies)
Discussion started by: kregh99
2 Replies
Login or Register to Ask a Question