I know this can be done because I've done it before on previous servers but I forgot how and web searches did not come up with the result.
I know what tmpfs is and that you should not remove it. What I want to do is to hide it. Basically I did something like modifying the output so that when you ran the df command it would exclude tmpfs from the output, but I forget exactly how I did it.
How can I hide the tmpfs from the df output? Again, not to delete or disable tmpfs, but merely to hide it from the output in ssh. It is annoying to see especially when I add many drives.
UPDATE: I was able to find in my saved files the command which does what I want, but now I need to know how to build this into .bashrc as an alias so that whenever I type:
df -h
it really sends:
df -Th| grep -Ev '(udev|tmpfs)'
edit: ok so I did figure out something. I can't do it for the full df -h
, but I can add it for the alias of df
, by adding this to .bashrc:
alias df="df -Th| grep -Ev '(udev|tmpfs)'"
ok, the oddest thing happened. After I added this command into .bashrc, now, even when I removed that same line altogether, it has fully modified the df
command so that even when I put df -h
it still hides all the tmpfs. I'm not sure if this is temporary but I reloaded .bashrc in ssh and still all tmpfs are hidden.
I then discovered the only way to revert it is to add back in this line into .bashrc
alias df="df -Th| grep -Ev '(none)'"
Now df behaves normally again. So, it seems the issue is solved.