tags:

views:

158

answers:

3

I have pictures from Picture_1.png to Picture_77.png in my Desktop.

I am now at a folder called Pictures in terminal. I would like to move the pictures to the folder where I am at the moment.

I tried the following code unsuccessfully

mv Picture_[1-77].png

I am not sure what I should add for the target folder because I am at the target folder.

How can you solve the problem?

+4  A: 
mv /path/to/pictures/Picture_* ./

./ means "the current directory"

Daniel LeCheminant
You could really just use . instead of ./
Nerdling
A: 

You need to specify the target folder even if you are at the target folder. For example, if my files were in Foo folder and I want to move them to Bar folder. Let's say that I'm in Foo folder, and here is how the directories are organized:

/ (root)
|--Foo/
|--Bar/

Then, I would do (inside Foo folder):

mv Picture_* ../Bar/
bLee
+2  A: 

Literally, you can solve it like this:

mv ~/Desktop/Picture_{1..77}.png ./

If you want to move all the pictures beyond 77 and other numbers too, Daniel L solution will do it too. His one is simplier and the best ad hoc solution if you know those are the only files with a Picture_ prefix.

Johannes Schaub - litb