Score:0

Copying a downloaded file into my current terminal folder

bq flag

I am compiling WRF on my HP Desktop. I'm in Ubuntu terminal and trying to use the cp command to copy from my D Drive, but it just won't work. Using cp D:\MyWRF/file.tar . All I get is cannot stat, Directory or file not found. I've tried switching \ to / but still no joy

David avatar
cn flag
I can assume you are running some kind of Linux you have not said. So there is no D drive that is a Windows construct. What version of Ubuntu are you using? It is unclear what you are truing to do.
Nmath avatar
ng flag
See: [Can I change directory to a Windows drive in Ubuntu Bash on WSL?](https://askubuntu.com/q/831361)
Score:0
bq flag

Thanks all, I figured it out. It didn't recognise the drive, I needed to go to it via df -h

Score:0
be flag

Drives on Linux aren't addressed by a letter. Instead, you have to mount them first, to a folder, and then you can access them in that folder.

To mount a drive, go into the Disks program (you can find it by pressing the windows key and searching "Disks"), then select the disk you want on the left hand side. Click on the disk partition you would like to use. Then press the little play icon just below it. Just bellow the partitions, there should be a line that says "Contents" and next to it there should be something like "Mounted at /media/YOURUSERNAME/PARTITIONNAME".

Then you would just be able to do cp /media/YOURUSERNAME/PARTITIONNAME/MyWRF/file.tar <your current working directory>.

If you're mounting an NTFS drive, especially one with Windows on it, make sure to back up your data, since I've had some data corruption happen because of this.

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.