2

The file is named Bamboo Makeup Brush Set.jpg

mv /home/said/Downloads/Bamboo Makeup Brush Set.jpg /home/said/Downloads/11/

doesn't work because of the spaces in the file name. How can I move this file using the command line?

0

2 Answers 2

9

Three options:

  1. Use tab completion. Type the first part of the file and hit Tab. If you've typed enough for it to be unique, it'll be completed. Otherwise, type more and hit Tab again. Or, hit Tab a second time to list all the possible completions.

  2. Surround the name in quotes:

    mv "File with Spaces" "Other Place"
    
  3. Use backslashes to escape the special characters:

    mv File\ with\ Spaces Other\ Place
    
4

Simply do:

mv /home/said/Downloads/Bamboo\ Makeup\ Brush\ Set.jpg /home/said/Downloads/11/

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