0

I am facing a storage problem on may SD card but I can't find the directory that might cause the problem.

I can't find those 5.1G hidden in pi directory

pi@domoticz:/home $ sudo du -xksh ./* | sort -n
5,1G    ./pi
84K ./cayenne
pi@domoticz:/home $ cd pi
pi@domoticz:~ $ sudo du -xksh ./* | sort -n
1,1M    ./scripts
1,4M    ./Adafruit_Python_SSD1306
4,0K    ./cayenne.err
4,0K    ./dead.letter
4,0K    ./domoticz-raspiBackup.log
4,0K    ./mosquitto-repo.gpg.key
4,0K    ./myNAS
4,0K    ./Pictures
4,0K    ./rpi_ybl0i2tn8w.sh
4,0K    ./sd_backup.sh
8,0K    ./test_beacon.py
10M ./libcoap
15M ./node_modules
24K ./package-lock.json
36K ./cayenne.out
60K ./install-coap-client.sh
61M ./domoticz
71M ./bundle
pi@domoticz:~ $ df -h
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/root          7,5G    7,0G  150M  98% /
devtmpfs           460M       0  460M   0% /dev
tmpfs              464M       0  464M   0% /dev/shm
tmpfs              464M     19M  446M   4% /run
tmpfs              5,0M    4,0K  5,0M   1% /run/lock
tmpfs              464M       0  464M   0% /sys/fs/cgroup
tmpfs              1,0M       0  1,0M   0% /var/temp
/dev/mmcblk0p1      43M     22M   21M  51% /boot
tmpfs               93M       0   93M   0% /run/user/110
tmpfs               93M       0   93M   0% /run/user/1000
pi@domoticz:~ $ code here

1 Answers1

2

Your first two commands are inconsistent.

pi@domoticz:/home $ sudo du -xksh ./* | sort -n
5,1G    ./pi

This says that /home/pi uses 5.1 G.

pi@domoticz:/home $ cd pi
pi@domoticz:~ $ sudo du -xksh ./* | sort -n

Here you are only looking at the files in /home/pi/*. With default bash settings, you are probably ignoring dotfiles /home/pi/.*.

pi@domoticz:~ $ df -h

This seems consistent with the first command. 7,0G is in use by root.

Hence, you probably have to look at dot files in /home/pi. For example: shopt -s dotglob; sudo du -xksh * | sort -n

Sparhawk
  • 19,941