Aller au contenu

du - df

du

Options:

[sentier@localhost thumbsup]$ ls -la

total 32
drwxrwxr-x  5 sentier psacln  4096 févr. 18 16:55 .
drwxrwxr-x 22 sentier psaserv 4096 févr. 18 17:09 ..
-rw-r--r--  1 sentier psacln   440 févr.  7 10:55 config-npm.json
drwxrwxr-x  6 sentier psacln  4096 févr. 26 18:24 Nas
drwxr-xr-x  5 sentier psacln  4096 févr.  7 10:46 theme-flow
drwxr-xr-x  5 sentier psacln  4096 févr.  7 10:46 theme-flow-bruno
-rw-r--r--  1 sentier psacln    24 févr.  7 11:39 theme_options.json
-rwxr-xr-x  1 sentier psacln  1317 févr. 12 15:27 thumbsup-npm.sh

Connaitre la taille des dossiers et fichiers d'un répertoire:

[sentier@localhost thumbsup]$ du -ach . --max-depth 1

4,0K    ./config-npm.json
4,0K    ./theme_options.json
4,0K    ./thumbsup-npm.sh
668M    ./Nas
2,2M    ./theme-flow
2,2M    ./theme-flow-bruno
672M    .
672M    total

Connaitre la taille des dossiers (et sous-dossiers) d'un répertoire:

[sentier@localhost thumbsup]$ du -h

21M ./Nas/Motos/24H Mans
11M ./Nas/Motos/GP France
...
672M    .

Afficher la taille totale d'un répertoire:

[sentier@localhost thumbsup]$ du -sh Nas/

668M    Nas/
[sentier@localhost thumbsup]$ du -Sh Nas/

21M Nas/Motos/24H Mans
11M Nas/Motos/GP France
9,3M    Nas/Motos/Bol Classic
...
4,0K    Nas/Faune
4,0K    Nas/_Archived Items
4,0K    Nas/

df (espace libre)

Options:

  • T: Type
  • h: Human
[sentier@localhost Nas]$ df -hT
Filesystem            Type      Size  Used Avail Use% Mounted on
udev                  devtmpfs  1,9G     0  1,9G   0% /dev
tmpfs                 tmpfs     393M  1,3M  391M   1% /run
/dev/mapper/vg00-lv01 ext4       47G   38G  7,1G  85% /
tmpfs                 tmpfs     2,0G     0  2,0G   0% /dev/shm
tmpfs                 tmpfs     5,0M   24K  5,0M   1% /run/lock
tmpfs                 tmpfs     2,0G     0  2,0G   0% /sys/fs/cgroup
/dev/sda1             ext4      464M  115M  321M  27% /boot
tmpfs                 tmpfs     393M     0  393M   0% /run/user/10001

Dernière mise à jour: March 4, 2022