Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have copied and pasted a directory of files into another.

The result is now this one development\ /

I do not know what that means? Linux does not even recognize it as a directory now.

Also the owner of this directory is wrong. But when I try to do this chown -R zugul /development, the result is: chown: impossibile accedere a/development': No such file or directory`

Looks like something went wrong when I have pasted the copied directory. How can I fix this issue?

share|improve this question

migrated from stackoverflow.com Dec 23 '11 at 19:14

This question came from our site for professional and enthusiast programmers.

    
i think the \ is escaping a space. try enclosing the path in double quotes and adding a space –  user931794 Dec 23 '11 at 18:37
add comment

4 Answers 4

Your directory name seems to have a space in it.

You can either use quotes:

chown -R zugul "/development /"

Or you can use escape characters:

chown -R zugul /development\ /
share|improve this answer
    
ok but how do I fix the space issue? I cannot even see it the folder live. It fires a 404 error.. –  DiegoP. Dec 23 '11 at 18:42
    
mv "/development " "/development". Or you can add %20 to your URL: foo.com/development%20 –  Blender Dec 23 '11 at 18:42
add comment

The filename is incorrect when you try to chown; try instead chown -R zugul development\\\ /.

share|improve this answer
add comment

Don't think this belongs to stackoverflow but basically you can do one of 2 things:

chown -R zugul /development*

If you have multiple /development directories it's a problem. Or

chown -R zugul "/development /"

In general though you might want to avoid making "development" directories part of the / level. These usually belong to /home/zugul/ somewhere.

Unless you copied the folder as root you won't see it in /. So either your operation failed or the folder in some other directory. If it is in some other directory then you need to do:

cd <dest directory>
sudo chown -R zugul "development /"
share|improve this answer
    
ok but how do I fix the space issue? I cannot even see it the folder live. It fires a 404 error.. –  DiegoP. Dec 23 '11 at 18:42
    
See the edit to the answer. I think you have confused things a little bit. It seems you are mixing the UNIX/Linux shell with Web Access. So you might want to clarify the issue before continuing. –  Karlson Dec 23 '11 at 18:44
add comment

Your directory name ends with a space (probably a regular space, but it could be some other blank character like an unbreakable space). Depending on what options you passed to ls, the \ either is in the file name or indicates that the next character is to be interpreted literally as part of the file name.

You'll want to rename the directory:

mv /development\  /development

(note the two consecutive spaces: the first is part of the file name and quoted by the preceding backslash, and the second space separates the two arguments). Or

mv '/development ' /development

If there is already a directory called /development, move the files from the /development ​ directory to /development then remove the badly-named directory (rmdir '/development '). Watch out for conflicts (files existing in both).

Once you've settled the naming issue, take care of other things such as ownership.

share|improve this answer
add comment

Your Answer

 
discard

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