0

Is there a program that makes a list of all the file names in my drive? I think this can go a long way in file recovery (more like replacement) if I ever get a bad drive.

Thanks

user3240815
  • 21
  • 1
  • 5

1 Answers1

0
$ sudo find / 

This will list all files from the root directory. But, this is also likely to contain files that don't actually exist on your hard drive

Running df -ah may display something like this

$ df -ah 
Filesystem        Size  Used Avail Use% Mounted on
/dev/sda1          66G   37G   26G  60% /
proc                 0     0     0    - /proc
sysfs                0     0     0    - /sys
none                 0     0     0    - /sys/fs/fuse/connections
none                 0     0     0    - /sys/kernel/debug
none                 0     0     0    - /sys/kernel/security
udev              3.9G  4.0K  3.9G   1% /dev
devpts               0     0     0    - /dev/pts
tmpfs             792M  824K  792M   1% /run
none              5.0M     0  5.0M   0% /run/lock
none              3.9G  1.6M  3.9G   1% /run/shm
binfmt_misc          0     0     0    - /proc/sys/fs/binfmt_misc

so you might try excluding some paths like

$ sudo find / |egrep -v "^/proc|^/sys|^/dev|^/run" 

Conversely, instead of grepping out certain files you might find that all you really care about is in /home and or /etc

$ sudo find /etc /home

If you have an external hard drive and its mounted, your path and UUID are likely to be different but you can try

$sudo find /media/81cb1964-8fbe-4ea8-ae7b-fd57c32c5b97/ 

Use df -ah to determine the path to where yours is mounted.

Keith Reynolds
  • 833
  • 6
  • 12