LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   file format why difference between "command line and GUI interface" (http://www.linuxquestions.org/questions/linux-newbie-8/file-format-why-difference-between-command-line-and-gui-interface-585254/)

hocheetiong 09-17-2007 07:16 AM

file format why difference between "command line and GUI interface"
 
1. I am using RHEL 3, i have already installed gnome as default GUI. i create a folder and file why have diffirence between "command line and GUI". Example: i want to create a folder on root /abc def the folder i wish to create with the "space" then at "command line interface" will "error" the out put will create two folder "abc" "def" but at "gui interface" than can create the folder with space also the files with space will no problem.


how to create folder or files the "folder name and files name" with "space" in command line interface.



Thank you very much...

reddazz 09-17-2007 07:44 AM

Spaces are special characters in the CLI. Its usually recommended that you do not use spaces in your filenames and if you have to, then enclose the name in quotes e.g.
Code:

$mkdir "abc def"

rkelsen 09-17-2007 07:57 AM

Quote:

Originally Posted by hocheetiong (Post 2894451)
how to create folder or files the "folder name and files name" with "space" in command line interface.

As mentioned, spaces are 'special' characters under the CLI. As with any other special characters, you need to 'escape' them.

This is done by inserting a backslash. Eg:

mkdir abc\ def

This will create a directory called "abc def"

David the H. 09-17-2007 08:19 AM

Because spaces are handled specially, the common tradition on *nix systems is to avoid them in filenames altogether. I suggest you get in the habit of substituting underscores or hyphens instead. It will save you a whole lot of hassle in the long run. The same goes for other special characters, such as ampersands, parentheses, brackets, and the like.


All times are GMT -5. The time now is 06:11 PM.