Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-17-2007, 07:16 AM   #1
Registered: Jul 2007
Location: Penang , Malaysia.
Distribution: red hat linux
Posts: 133

Rep: Reputation: 15
Smile 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...
Old 09-17-2007, 07:44 AM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
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.
$mkdir "abc def"
Old 09-17-2007, 07:57 AM   #3
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 2,023

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Originally Posted by hocheetiong View Post
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"
Old 09-17-2007, 08:19 AM   #4
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,834

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 05:08 PM
gdb "not in executable format: File format not recognized" tcma Programming 9 07-18-2007 07:02 AM
mice: difference between xorg.conf's "ButtonMapping" and xmodmap on command line??? whysyn Linux - Hardware 3 03-16-2007 08:06 AM
cdrecord command-line parentheses "(" ")" coolingtower Linux - Software 1 10-28-2005 12:49 PM
Error in man command "sh: line 1: /usr/bin/gtbl: No such file or directory" MinA Slackware 1 09-06-2004 07:36 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:05 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration