Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Suppose there is directory with files and most of them have "ubuntu" string in common to the name of file .

i used the command

mv ubuntu1 ubuntu2 ubuntu3 ubuntu/

now i want to move all these files from this directory to other directory without moving each file differently.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Use the command

mv *ubuntu* destination_directory_path/

where *ubuntu* indicates that ubuntu may appear anywhere in between the file/folder name.

NOTE: This will move all files which have ubuntu in their name in the current directory and the destination folders name should not have ubuntu in it. If it is present, first rename the destination to somthing else and then try the above command.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.