Welcome!
This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.
How To Use LVM To Manage Storage Devices on Ubuntu 16.04
Introduction
LVM, or Logical Volume Management, is a storage device management technology that gives users the power to pool and abstract the physical layout of component storage devices for easier and flexible administration. Utilizing the device mapper Linux kernel framework, the current iteration, LVM2, can be used to gather existing storage devices into groups and allocate logical units from the combined space as needed.
How do I determine the total size of a directory (folder) from the command line?
du -hs /path/to/directory
-h is to get the numbers "human readable", e.g. get 140M instead of 143260 (size in KBytes)-s is for summary (otherwise you'll get not only the size of the folder but also for everything inthe folder separately)
How do I determine the total size of a directory (folder) from the command line?
The command du
"summarizes disk usage of each FILE, recursively for directories," e.g.,
du -hs /path/to/directory
-h
is to get the numbers "human readable", e.g. get140M
instead of143260
(size in KBytes)-s
is for summary (otherwise you'll get not only the size of the folder but also for everything inthe folder separately)
As you're using -h
you can sort the human readable values using
du -sh | sort -h
The -h
flag on sort
will take into consideration "Human Readable" size values.
If want to avoid recursively listing all files and directories, you can supply the --max-depth
parameter to limit how many items are displayed. Most commonly, --max-depth=1
du -sh --max-depth=1 /path/to/directory
ورود به انجمن
درباره ی این بخش
Question tools
Stats
Asked: 2018/12/4، 11:15 |
Seen: 164 times |
Last updated: 2019/2/18، 12:40 |