I'm working on a little util tool written in bash that gives me some information about a game server on Linux. For that reason I need a possibility to display the size of the file contents.
I'm doing that right now by using this:
du -Lshc *
It works almost perfect! The only flaw is that it displays stuff like this:
21G backups
22G server
8.0K start.sh
151M world.zip
43G total
This is fine but I want more digits. Meaning it should look like that:
21.587G backups
22.124G server
8.089K start.sh
151.198M world.zip
43.436G total
Is there a possiblility to do that?
I wouldn't mind using a complex command since I use it in a .sh file so I won't type it by hand every time.
108.000B. Which is some kind of akward.) But thank you anyways! – BrainStone Aug 18 '13 at 13:06ls -las well,if ($5>0){ $5 = hr($5) }and same for$1, then justprintto print the re-assembled$0with one or the other field modified. – Peter Cordes Jan 06 '24 at 12:18