|
|
[[_TOC_]]
|
|
|
## Tips & tricks
|
|
|
|
|
|
### Displaying the footprint of a directory
|
|
|
#### On a ceph appliance
|
|
|
On a ceph appliance, please use this command:
|
|
|
```
|
|
|
$ getfattr -d -n ceph.dir.rbytes /store/teams/
|
|
|
# file: store/teams/
|
|
|
ceph.dir.rbytes="40454837494686"
|
|
|
$
|
|
|
```
|
|
|
You will need to divide by 1024 to get Mbytes, Gbytes etc..
|
|
|
#### On any Unix like system
|
|
|
```
|
|
|
$ du -hs /scratch/alainm/view/fargo/kokkos
|
|
|
8.5G /scratch/alainm/view/fargo/kokkos
|
|
|
```
|
|
|
Please not that the du can be demanding on the appliances.
|
|
|
|
|
|
### Displaying directory files in decreasing size
|
|
|
```
|
|
|
$ du -a /scratch/alainm/view/fargo/kokkos/ | sort -r -k1 -n | tee du.log
|
|
|
8816260 /scratch/alainm/view/fargo/kokkos/
|
|
|
...
|
|
|
0 /scratch/alainm/view/fargo/kokkos/dbg/CMakeFiles/3.18.0/CompilerIdC/tmp
|
|
|
15:08:20 [alainm@castor data]# head -2 du.log
|
|
|
8816260 /scratch/alainm/view/fargo/kokkos/
|
|
|
3346571 /scratch/alainm/view/fargo/kokkos/dbg
|
|
|
15:08:26 [alainm@castor data]#
|
|
|
```
|
|
|
Please note that the **du** can be demanding on the appliances. |
|
|
* [Knowing the footprint of your directories](Storage/Knowing the footprint of your directories) |