Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

by default

Posted on 2014-04-10
2
Medium Priority
?
254 Views
Last Modified: 2014-04-10
By default the space in bytes or something

JUst to verify

df -k /appl/oracle/TSSUDALM/exp01/exp
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/ora_db01_exp_vg    35651584  30097928   16%     1067     1% /oracle/db01/exp01
0
Comment
Question by:tonydba
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 39991788
By default the space is shown in 512-byte blocks in systems adhering to POSIX, like AIX etc.

To get this behaviour in GNU/Linux you must set the environment variable "POSIXLY_CORRECT".

POSIXLY_CORRECT=1 df /appl/oracle/TSSUDALM/exp01/exp

With the "-k" flag as in your question it's shown in kilobytes, which is the default in GNU/Linux when POSIXLY_CORRECT is not set.

unset POSIXLY_CORRECT; df /appl/oracle/TSSUDALM/exp01/exp        # same as "df -k ..."

In your example the filesystem has a total of 35651584 KB which is roughly 34.8 GB.

There is (in GNU/Linux) also a "-h" flag ("human readable") and to actually get the values in bytes you can use "--block-size=1"

To make this your default you could create an alias

alias df='df --block-size=1'
0
 

Author Closing Comment

by:tonydba
ID: 39991863
Thank you
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question