If you try to copy, save, or move a file in Shell that has spaces in it, you will quickly find that if you do not type it correctly the command will reject. There is a very easy fix for this, and once you see it you will never forget it.
Step 1 Boot your computer and open a Shell window.
Step 2 Make sure you have files that you need to copy, move, or save. A good example of this would be .jpg files of recent photos you have uploaded to your computer.
Step 3 An example would be to move a certain .jpg to another area. Since Shell does not recognize files with spacing, you cannot type: mv Picture of Dog.jpg mydirectory/. There are a couple of ways to get Shell to understand the complete file name.
Step 4 One way to move a photo to “My Directory” would be to use the command: mv “Picture of Dog.jpg” mydirectory/. In this example you can place the .jpg inside quotation marks.
Step 5 Another way to move a photo to “My Directory” would be to use the command: mv Picture\ of\ Dog.jpg mydirectory/. In this example you would separate each word with a backslash instead of quotations.
How to Work with Files with Spacing in Linux
tags: Linux | author: chaoPosts Relacionados:
Subscribe to:
Post Comments (Atom)
0 comment:
Post a Comment