rickticktock
Posts: 25
Joined: Mon Aug 20, 2018 10:13 am

/home/pi/Downloads onto external hard drive?

Mon Feb 17, 2020 4:32 pm

I say chaps,
Is it possible to choose where downloads are put by default? I should like to use a USB 1TB hard drive for this purpose, leaving the MicroSD just for programs and OS.
TTFN

jahboater
Posts: 5680
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: /home/pi/Downloads onto external hard drive?

Mon Feb 17, 2020 4:35 pm

Yes!

You could tell the browser to download to a different directory.

or you could create a symbolic link from /home/pi/Downloads to your large USB disk (/media/pi/xxxx).

or you should be able to mount the USB drive at /home/pi/Downloads
Pi4 8GB running PIOS64

DirkS
Posts: 10347
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: /home/pi/Downloads onto external hard drive?

Mon Feb 17, 2020 4:40 pm

Downloads from which program?
For Chromium browser you can change the default location in the advanced settings

User avatar
thagrol
Posts: 2961
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: /home/pi/Downloads onto external hard drive?

Mon Feb 17, 2020 6:31 pm

rickticktock wrote:
Mon Feb 17, 2020 4:32 pm
I say chaps,
Is it possible to choose where downloads are put by default? I should like to use a USB 1TB hard drive for this purpose, leaving the MicroSD just for programs and OS.
TTFN
Yep. Stuff to research:
  • Which filesystem to use, linux vs windows vs MacOS filesystems.
  • Mounting external drives: how, what, where, and what options to use.
  • Linux file/directory permissions and how they're mapped from non-linux filesystems.
  • Symbolic links
There are a number of ways to acheive what you want, one approach would be to mount the external drive, create a myuser/downloads directory on it, copy the contents of ~myuser/downloads to it, remove ~myuser/downloads, symlink path_to_external_drive/myuser/downloads to ~myuser/downloads. Unlike with the "tell the program where to download to approach already suggested" this would put anything downloaded to the default directory onto the external HDD without you having to explictly tell the program where to put it.

Another approach would be to move your user's entire home directory and it's contents onto the external HDD. Going this way you also need to research "usermod" and really should format the HDD in ext4 as you'll have all sorts of problems with permissions and security with non-linux native filesystems.
Attempts to contact me outside of these forums will be ignored unless signed in triplicate, sent in, sent back, queried, lost, found, subjected to public enquiry, lost again, and finally buried in soft peat for three months and recycled as firelighters

rickticktock
Posts: 25
Joined: Mon Aug 20, 2018 10:13 am

Re: /home/pi/Downloads onto external hard drive?

Thu Feb 20, 2020 9:42 am

I say chaps,
Thank you for your useful suggestions. I will now try them.
TTFN

Return to “Advanced users”