+5 votes
231 views
How to make Linux file size human-readable?

in Linux / Unix by (552k points) | 231 views

1 Answer

+3 votes
Best answer

Human parameters

Many Linux commands that display file sizes, such as the directory lister ls or the display of free disk space df , by default provide a result that is relatively unsuitable for human use.

It also has to be, because many scripts record and process these results of the commands.

Human parameters

However, in order to achieve readable results, many programs have the parameter -h , such as "human", which, for example, outputs the variant "6.2G" instead of "6543449".

So to determine the free space on the hard drive, enter df -h  . And you get readable size information.

File sizes in readable format

File sizes in readable format


by (552k points)

Related questions

+4 votes
1 answer
asked Jul 6, 2023 in Linux/Unix by backtothefuture (552k points) | 66 views
+4 votes
1 answer
asked Jun 12, 2020 in Linux / Unix by backtothefuture (552k points) | 308 views
+3 votes
1 answer
asked Dec 3, 2019 in Linux / Unix by backtothefuture (552k points) | 327 views
+4 votes
1 answer
+5 votes
1 answer
asked Nov 15, 2019 in Linux / Unix by backtothefuture (552k points) | 640 views
Sponsored articles cost $40 per post. You can contact us via Feedback

Most popular questions within the last 30 days

10,659 questions
10,791 answers
510 comments
3 users