Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mount command - how to emulate centos behavior
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
akbarstatx
n00b
n00b


Joined: 14 Oct 2002
Posts: 67
Location: Minneapolis, MN

PostPosted: Fri May 29, 2015 2:46 am    Post subject: mount command - how to emulate centos behavior Reply with quote

The mount command on gentoo is very verbose. It lists all the /sys mounts for example while on a centos build it just shows that disks that are mounted (with temp filesystems too I guess) Is there a way to make the mount command less verbose and only show mount points that way a centos install would or is there another command that I could use?
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 836

PostPosted: Fri May 29, 2015 9:30 am    Post subject: Reply with quote

Have you tried `df`? It has switches that adjust what sorts of mounted filesystems it will show. It doesn't and can't show all the information that `mount` does, but depending on your use of the command, `df` may be sufficient.
Back to top
View user's profile Send private message
EmaRsk
Apprentice
Apprentice


Joined: 07 Sep 2004
Posts: 158
Location: Italy

PostPosted: Fri May 29, 2015 12:26 pm    Post subject: Reply with quote

You can use "mount -t ext4,ext2" for example, if you have only ext4 and ext2 filesystems.
Or "findmnt -t ext4,ext2" for a nicer view, as the mount man page itself suggests:
man mount wrote:
The listing mode is maintained for backward compatibility only.

For more robust and customizable output use findmnt(8), especially in your scripts.
Back to top
View user's profile Send private message
akbarstatx
n00b
n00b


Joined: 14 Oct 2002
Posts: 67
Location: Minneapolis, MN

PostPosted: Fri May 29, 2015 2:15 pm    Post subject: Solved Reply with quote

Oh yes, df -T will do exactly what I need. Actually I generally use df -h but with adding the -T switch, it lists the filetypes as well.

Thanks guys.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum