im working with PHP on my Raspberry PI, and im trying to find a file on a USB drive, this will be in a cron job for every minute...
The file has a name that i will know every time (settings.txt) and i have the required output to figure out what drives i have.. Now i cant figure out how to sort them...
Im writing them all to a text file but they are not spaced with on every line and not with \t between them... how is it possible to get the value of "Mounted On" ?
Output:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 3648564 3479396 152784 96% /
devtmpfs 469756 0 469756 0% /dev
tmpfs 474060 452 473608 1% /dev/shm
tmpfs 474060 6928 467132 2% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 474060 0 474060 0% /sys/fs/cgroup
/dev/mmcblk0p1 65480 20256 45224 31% /boot
tmpfs 94812 48 94764 1% /run/user/1000
/dev/sda1 15625744 5330752 10294992 35% /media/kristian/D81C-745F
Device info: OS: Ubuntu Mate 15.** PHP: 5.6