File location question
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
File location question
How do you in linux, change where a file is stored? For example, on my Windows box I have five drives, a boot drive, a game drive, a storage drive, and two backup drives. I have documents, music, videos, and pictures going to my "E" drive. Instead of loading on the "C" drive, I have them pointed to the "E" drive. It was really easy to do that in Windows, but I am not sure how to have a linux boot drive, and point it to my storage drive. I am still somewhat unsure of the linux drive conventions so I am afraid of zorching my file system. On my windows system, my boot drive is a single 512 gb Western Digital NVMe drive, and the storage drive is a 2 terabyte Western Digital 7200 rpm drive. The game drive is a 500 gb Samsung SSD and that is where I have all of my Steam games loaded. I want to be able to load games and such onto the other drives, and "point" to them so that linux can find them. Can anyone give me easy directions on how to do this?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: File location question
I move my trash locations like this:
So, move your files to where you want them then use this format to create a link:
Code: Select all
ln -s /media/boot/HWRAID10-0/Trash /home/boot/.local/share/Trash
Code: Select all
ln -s <dest> <source>
<dest>
points to where you moved the directory to and <source>
creates a link where you moved the directory from."There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: File location question
The easy way is through using partitioning to set up your Linux. You can partition a single physical drive, or you can have some of your partitions on one drive, and some on another. What I have on my system is two physical drives set up like this:MurphCID wrote: ⤴Mon Feb 19, 2018 6:31 pm How do you in linux, change where a file is stored? For example, on my Windows box I have five drives, a boot drive, a game drive, a storage drive, and two backup drives. I have documents, music, videos, and pictures going to my "E" drive. Instead of loading on the "C" drive, I have them pointed to the "E" drive. It was really easy to do that in Windows, but I am not sure how to have a linux boot drive, and point it to my storage drive. I am still somewhat unsure of the linux drive conventions so I am afraid of zorching my file system. On my windows system, my boot drive is a single 512 gb Western Digital NVMe drive, and the storage drive is a 2 terabyte Western Digital 7200 rpm drive. The game drive is a 500 gb Samsung SSD and that is where I have all of my Steam games loaded. I want to be able to load games and such onto the other drives, and "point" to them so that linux can find them. Can anyone give me easy directions on how to do this?
/ = /dev/sda1
/home = /dev/sda2
/SWAP = /dev/sda3
/home/multimedia = /dev/sdb1
So while /home is split over two physical drives, I can use my backup process to grab everything under "/home" in one command while keeping my interest areas in two places.
I have three external USB drives that I use for backups and connect each on a rotating basis to do my actual backups. No matter which physical drive I'm using at the time for the backup, it always shows up as being mounted as "/dev/sdc" but with the label of the drive showing in the GUI file explorer (i.e., Backup1, Backup2, or Backup3).
You can tell the application program exactly what subdirectory to put a document or an MP3 file in.
Re: File location question
Thanks I am still unsure on the concept, so please bear with me.
If I have a 512gb boot drive (sba?)which I want to keep "clean" for the most part and only have the o/s, and applications on, and a 2 TB regular hard drive (sdb?) where I want all the documents, music, videos, games, etc to be stored, how would I link those two so it happens? In Windows I just tell the file location to be E:\ rather than C, and voila! no problemo.
If I have a 512gb boot drive (sba?)which I want to keep "clean" for the most part and only have the o/s, and applications on, and a 2 TB regular hard drive (sdb?) where I want all the documents, music, videos, games, etc to be stored, how would I link those two so it happens? In Windows I just tell the file location to be E:\ rather than C, and voila! no problemo.
- shawnhcorey
- Level 4
- Posts: 217
- Joined: Thu Jun 17, 2010 11:23 am
- Location: The Great White North
- Contact:
Re: File location question
When you install Linux, it will automatically look for all drives and place them on your desktop. They wouldn't be labelled 'C:' or 'E:'. Instead, the name will be taken from their firmware, that is, what the manufactured names them. There is no simple way to change their labels in Linux because doing so requires root (admin) privileges.MurphCID wrote: ⤴Mon Feb 19, 2018 6:31 pm How do you in linux, change where a file is stored? For example, on my Windows box I have five drives, a boot drive, a game drive, a storage drive, and two backup drives. I have documents, music, videos, and pictures going to my "E" drive. Instead of loading on the "C" drive, I have them pointed to the "E" drive. It was really easy to do that in Windows, but I am not sure how to have a linux boot drive, and point it to my storage drive. I am still somewhat unsure of the linux drive conventions so I am afraid of zorching my file system. On my windows system, my boot drive is a single 512 gb Western Digital NVMe drive, and the storage drive is a 2 terabyte Western Digital 7200 rpm drive. The game drive is a 500 gb Samsung SSD and that is where I have all of my Steam games loaded. I want to be able to load games and such onto the other drives, and "point" to them so that linux can find them. Can anyone give me easy directions on how to do this?
Don't stop where the ink does.
Re: File location question
I understand, but if I want documents, music and photos to be on the 2 tb drive, and the 512 gb is my o/s drive, how do I do that in linux?
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: File location question
To avoid messing to much you can move/copy the folders/files in question to the chosen location first, using the file manager and a simple cut or copy and paste or using the command line and a tool like
Then use the file manager (for Nemo right click on the folder in the new location and use the Make Link option then move and rename the new Link to folder) or the command line tool
An example one liner terminal command that moves the folder ~/TEST and it's contents from home to my back-up external drive and creates a symlink in home to the new location.
If you want to move the whole home folder to the other drive we need to see how your drives are mounted now?
mv
, cp
or rsync
.Then use the file manager (for Nemo right click on the folder in the new location and use the Make Link option then move and rename the new Link to folder) or the command line tool
ln
to create symlinks in your home that point to the new locations.An example one liner terminal command that moves the folder ~/TEST and it's contents from home to my back-up external drive and creates a symlink in home to the new location.
mv ~/TEST /mnt/backup_drive/TEST && ln -s /mnt/backup_drive/TEST ~/
If you want to move the whole home folder to the other drive we need to see how your drives are mounted now?
blkid && cat /etc/fstab
will tell us.For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
- shawnhcorey
- Level 4
- Posts: 217
- Joined: Thu Jun 17, 2010 11:23 am
- Location: The Great White North
- Contact:
Re: File location question
Most apps will remember where you open and saved during your last session. For example, if you open your music app and load a file from a directory on the 2 TB drive, the next time your start the app, it should remember where it was and set the open dialog to the same directory.
Of course, this is for most apps. Some do not do this. All I can say is to try it and if it doesn't behave as you expect, then ask for more help.
Don't stop where the ink does.
Re: File location question
Thanks.