PDA

View Full Version : [ubuntu] How do I put a file in a directory?



Carnivorum
May 7th, 2008, 02:18 PM
Bs'd

I have 2 files on my desktop, and I want to put them into a directory.

How do I do that?

I already made the directory, I only don't know how to move the files to there.

TeoBigusGeekus
May 7th, 2008, 02:20 PM
Right click them->Cut
and then Paste them in the directory you wanna put them.

Carnivorum
May 7th, 2008, 02:21 PM
Bs'd

As far as I know, that directory only exists in the console. So how can I paste something into the console?

glennric
May 7th, 2008, 02:23 PM
From the terminal you can type

mv filename path/to/newlocation

Although, any files that exist are available both from the terminal and nautilus.

Joeb454
May 7th, 2008, 02:23 PM
Do this in a terminal
cd ~/Desktop
mv ./<filename> ~/<directory>

Where <filename> is the name of the file, and <directory> is the name of the directory you want to move it to (assuming it's in your home folder).

Also remember that Linux is case sensitive :)

TeoBigusGeekus
May 7th, 2008, 02:24 PM
Bs'd

As far as I know, that directory only exists in the console. So how can I paste something into the console?

Could you be a bit more descriptive regarding your problem?

Carnivorum
May 7th, 2008, 02:36 PM
Bs'd

I'm making progress. I'm now in that directory, together with those 2 audio files

I connected them together, it were 2 parts of large song which couldn't be sent in one shot by email.

Now I want the song out of that directory, back to my desktop, so I can put it in amerok and other things.

How do I do that?

TeoBigusGeekus
May 7th, 2008, 02:38 PM
mv filename ~/Desktop

Carnivorum
May 7th, 2008, 02:47 PM
Bs'd

I'm now in the directory poetpendulum.

When I do there "ls", I get:

Poet.mp3aa Poet.mp3ab The Poet And The Pendulum.mp3

Then I do: mv The Poet And The Pendulum ~/Desktop, and then he tells me:

`The': No such file or directory

AndrewTheArt
May 7th, 2008, 02:50 PM
Bs'd

I'm now in the directory poetpendulum.

When I do there "ls", I get:

Poet.mp3aa Poet.mp3ab The Poet And The Pendulum.mp3

Then I do: mv The Poet And The Pendulum ~/Desktop, and then he tells me:

`The': No such file or directory
When referring to filenames with spaces on the terminal, you need to put it it quotes. Otherwise, it takes each individual space separated word as a different argument.

Try -


mv "The Poet And The Pendulum.mp3" ~/Desktop

muteXe
May 7th, 2008, 02:51 PM
What does "Bs'd" mean?

Carnivorum
May 7th, 2008, 02:51 PM
Bs'd

Somebody told me to put the "poet and the pendulum" between inverted comma's, and now it worked.

Thanks everybody for your help.

TeoBigusGeekus
May 7th, 2008, 02:52 PM
Try
mv "The Poet And The Pendulum".mp3 ~/Desktop

Joeb454
May 7th, 2008, 02:52 PM
You don't have to use quotes. You can also se a backslash followed by a space (i.e. "\ " though without quotes ;))

Just letting you know the other options available :p

Joeb454
May 7th, 2008, 02:53 PM
What does "Bs'd" mean?

I was also wondering this ;)

tetsuc
May 7th, 2008, 02:57 PM
apparently it means "with the help of heaven". who knew... learn something new every day :)

(referred to here: http://yeshuaministries.tripod.com/BS-D.htm)

Carnivorum
May 7th, 2008, 03:21 PM
Bs'd

The above is an abbreviation of the Aramaic expression: Ba siata desmaya, and that means: With the help of heaven.

AndrewTheArt
May 7th, 2008, 09:26 PM
You don't have to use quotes. You can also se a backslash followed by a space (i.e. "\ " though without quotes ;))

Just letting you know the other options available :p
But that's highly annoying :)

t0p
May 7th, 2008, 09:37 PM
When referring to filenames with spaces on the terminal, you need to put it it quotes. Otherwise, it takes each individual space separated word as a different argument.

Try -


mv "The Poet And The Pendulum.mp3" ~/Desktop

Or you can use the "escape character", \, like this:

mv The\ Poet\ And\ The\ Pendulum.mp3 ~/Desktop

Incidentally, earlier you said that a particular directory only exists in the console and not in Nautilus. This is incorrect. In the console, input the command

ls
and you'll get a list of directories and files in your Home directory, right? Now, click on Places > Home Folder and the gui will show you the contents of your Home directory. Compare this to the list you got in console - they're the same, yeah?

Well they should be the same anyway...

xzero1
May 7th, 2008, 09:57 PM
There are some tuturial videos you may be interested in.
See http://screencasts.ubuntu.com/