LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-20-2011, 04:46 AM   #1
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
df -t nfs -h


Hi all

When i do this command
Code:
# df --type nfs -h
Filesystem            Size  Used Avail Use% Mounted on
ip:/CVBDISK
                      137G  127G   11G  93% /CVBDISK
hostname:/VOLUME1/PUBLIC
                      1.4T  1.1T  260G  82% /nasdisk4
i get something like that... but how can i put them in that table more nicely?
like:
Code:
# df --type nfs -h
Filesystem                                    Size  Used Avail Use% Mounted on
ip:/CVBDISK                                   137G  127G   11G  93% /CVBDISK
hostname:/VOLUME1/PUBLIC                      1.4T  1.1T  260G  82% /nasdisk4

Last edited by brownie_cookie; 05-20-2011 at 04:52 AM.
 
Old 05-20-2011, 05:07 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,247

Rep: Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684Reputation: 2684
Well I do not have a nfs mount to test, but try redirecting into column?
 
Old 05-20-2011, 05:13 AM   #3
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Original Poster
Rep: Reputation: 12
how do i do that
 
Old 05-20-2011, 05:24 AM   #4
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Original Poster
Rep: Reputation: 12
i now do this
Code:
# df -t nfs -h | column -tx
Filesystem                                   Size  Used  Avail  Use%       Mounted  on
ip:/CVBDISK
137G                                         127G  11G   93%    /CVBDISK
hostname:/VOLUME1/PUBLIC
1.4T                                         1.1T  260G  82%    /nasdisk4
but as you can see, the rows aren't filled in properly...
the 137G must be next to CVBDISK. how can i do this?

P.S.: when i do the 'df' command with the specified types, are those 2 my NFS mounts??
 
Old 05-20-2011, 05:32 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Try the -P option of df. It will print a POSIXLY conform output, putting all the stuff on the same line (one per filesystem):
Code:
df -P -t nfs -h | column -tx
 
Old 05-20-2011, 05:35 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by brownie_cookie View Post
P.S.: when i do the 'df' command with the specified types, are those 2 my NFS mounts??
Yes, it should be. You can easily verify it using the -T (uppercase T) option to print out the filesystem type:
Code:
df -P -T -t nfs -h | column -tx
 
1 members found this post helpful.
Old 05-20-2011, 05:36 AM   #7
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Original Poster
Rep: Reputation: 12
all hail colucix !!!
thanks man !! that one did it

Code:
# df -P -t nfs -h | column -tx
Filesystem                                   Size  Used  Avail  Use%  Mounted    on
ip:/CVBDISK                                  137G  127G  11G    93%   /CVBDISK
hostname:/VOLUME1/PUBLIC                     1.4T  1.1T  260G   82%   /nasdisk4
but can you perhaps also answer to my other question?
does this command show me the mounts of the type nfs?
 
Old 05-20-2011, 06:00 AM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by brownie_cookie View Post
all hail colucix !!!
thanks man !! that one did it
You're welcome!
Quote:
Originally Posted by brownie_cookie View Post
but can you perhaps also answer to my other question?
does this command show me the mounts of the type nfs?
Yes. I already answered in my second post above. You can first verify all the output from df using the -T option, to see every filesystem along with the fs-type. Then add the -t nfs option to check if only the wanted filesystems are shown and all the others excluded.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NFS mount fails (times out): NFS server is in DMZ, NFS client is in intranet Hiroshi Linux - Networking 2 05-24-2010 11:22 AM
ls: cannot access /etc/resolv.conf: stale nfs file handle - but i'm not using nfs schneidz Linux - General 4 10-02-2009 03:39 PM
nfs server on ubuntu doesn't play nice with nfs client on solaris mathiraj Linux - Networking 11 09-15-2009 03:08 PM
LXer: Run your NFS server in the user address space with NFS-GANESHA LXer Syndicated Linux News 0 11-27-2008 05:40 AM
NFS client = Linux, NFS server = Mac OS X Tiger --> Hell of a problem make Linux - Networking 9 03-10-2006 06:16 AM


All times are GMT -5. The time now is 03:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration