Score:1

How can I tell BASH which disk I want to create a file on?

tj flag

I want to create a file on an Ubuntu machine, and I want to make sure I put it in the right drive for my purposes. If this were Windows, I could check whether putting it in C:, to D:, or to E:, but it is not intuitive in Ubuntu how to specify the drive. Is there an easy way to make sure I'm putting my file in the right drive?

Zatigem avatar
ru flag
For other drives like external hard drives, use `lsblk -e 7`. The default mount point is `/media/USER/LABEL`. `LABEL` is defined by the drive’s owner and is easier to identify if you rename all your drives (see @karel’s comment).
Score:0
tj flag

There certainly is an easy way to specify the drive a file is going to - it's just not all that obvious to newbies coming from Windows. If you open the System Monitor and click File Systems at the top, you can see a list of all the drives, how big each is, and how much of each is consumed. If the drives are all of different sizes & you know the size of the one you want to use, that information should be sufficient to figure out which of the lines you're interested in.

The key you're looking for is in the Directory column (which may also help identify the drive you want). In that column you can see 1) what directory to put your file under to make sure that it's on the drive you want, and 2) in the name of the directory, a description of what's on the drive. enter image description here

If you do not see all of the columns shown here, you can right-click on the header of one of the columns and see a checklist of which columns to show.

As you get better and learn more about your system, you may want to try the lsblk command in the Terminal. (Thanks @Paul_Pazderski)

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.