My RPi 3 model B SD card would not load after an attempt to upgrade today, which aborted part way through. I reinstalled a fresh system on a new card and all is well. I loaded the old card in a USB SD card adapter and plugged it into the Pi. The file manager shows it as the /media directory and lists all of the system files and directories. What I cannot find on it are the Python scripts I wrote. I expected them to be in a Pi directory but they are not. Does anyone know where I can find them. I have some day old backups, so it is not vital, and they are only simple scripts I used to learn the system, but I am curious as to where they are. Thanks. BTW, I used find files in the File Manager and it does not find them.

1 Answer 1


Try this change to the media directory:

cd /media

then do a directory listing:


You should see a pi directory

change to the pi directory:

cd pi

and again do a directory listing


You should see two directories a boot directory and a directory made up of a long string of letters and numbers (this may also be called root).

Change to the non boot directory:

cd 7f59532.... 

Note: you can just do cd and the first few characters and hit tab

Do another directory listing:


You Should see a long list of directories including home

You can change to the pi directory with the following command:

cd /home/pi

You should now be in Pi's home directory on the old SD card.

  • Thanks. You pointed me in the right direction. I found them in /media/pi/root/home/pi
    – Glenn
    Jun 23, 2017 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.