I am in the Unix/Linux terminal right now and I'm not in any kind of editor such as vi or emacs. Now when I type in the "df" command, I get the amount of disk free space in KILOBYTES. I want to change the default so that when I type in "df" only, I get the disk free space all listed in MEGABYTES. I already know that "df -m" and "df -h" commands give the values in MEGABYTES, but I just want to strictly type in "df" so that I get all the values listed in MEGABYTES. Once again, I'm in the tcsh shell. I really would like the most basic step by step explanation to this since I have asked this several times before in the clearest way possible and still couldn't understand. I the need an extremely clear answer to this immediately since it is an emergency.
Linux – How to change the default for the “df” command in the Unix/Linux Terminal in the tcsh shell
dflinuxunix
Best Answer
My
df
takes a-m
flag:You can also use
df -h
to get 'human-readable' values:You can also set the environment variable
BLOCKSIZE
to1M
, and save that in your.profile
to make it the default.