Is there a way to show only ACTUAL normal mounted devices? Lot of distros seem to put lot of stuff in there
On some distros there's so much junk to sift through when you do mount -l to see what is mounted. I just want to see actual disk devices, not 50+ system devices. Is there a way to streamline that? Maybe another argument than -l that I should be using or another command altogether?
|
You can provide the filesystem type, e.g.
Code:
mount -t ext4 -t xfs -t vfat EDIT: It doesn't quite work; it seems that the mount command only takes into account the last -t option. EDIT2: While looking into this, I found this very interesting paragraph in the mount manual page: Quote:
Or use good old grep to trim the list: Code:
mount -l | grep -v -e /sys -e /run Code:
mount -l |grep /dev/ |
df ?.
|
Quote:
|
Quote:
Code:
$ mount | grep -E 'ext|xfs|vfat|btrfs' |
Quote:
Code:
More than one type may be specified in a comma separated list. Code:
mount -t ext4,xfs,vfat |
Quote:
|
One hopes so - should that day ever come, we're in real strife.
|
I think that’s what we’re here for...to learn...the teaching is but a plus.
|
Damn so there's no easier way? I don't really want to have to type up all that each time. I can make a script, but that won't always be available on a new or foreign system.
I guess that's probably the best bet though, if I make the script universal enough I can just make it part of my "deploy kit" which is basically a set of helper scripts I load on any machine I setup. I don't like having to specify each file system though, if a new file system comes out or there is one I don't know about then I won't see that mount point. I could maybe use df, and then get the mount names, then check those individually. Essentially could just make my own mount script to check the mount points. Though grep is a good idea too, if I get rid of anything in /sys, /proc etc it will clean up the list. Can just make a new command called showmounts or something and throw in in /usr/bin. |
Alternative? The output of the lsblk will show all physical block devices which could be large and their mount points if mounted.
|
Quote:
|
I would say if you have a special requirement you need to implement it. Either you use what was suggested or make a script/function/alias to filter whatever you need from the output of any command and also to print it in your preferred format.
It looks like there is no ready made solution for you (or at least we don't know about it). Actually the expression "normal mount" is not really well defined. |
Quote:
|
df also spits out some tmpfs and /run partitions.
Code:
mount -t ext4 -l |
All times are GMT -5. The time now is 04:02 AM. |