LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 09-17-2007, 06:16 AM   #1
hocheetiong
Member
 
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, 06:44 AM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
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"
 
Old 09-17-2007, 06:57 AM   #3
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,748

Rep: Reputation: 159Reputation: 159
Quote:
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, 07:19 AM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

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


Reply


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 04:08 PM
gdb "not in executable format: File format not recognized" tcma Programming 9 07-18-2007 06:02 AM
mice: difference between xorg.conf's "ButtonMapping" and xmodmap on command line??? whysyn Linux - Hardware 3 03-16-2007 07:06 AM
cdrecord command-line parentheses "(" ")" coolingtower Linux - Software 1 10-28-2005 11:49 AM
Error in man command "sh: line 1: /usr/bin/gtbl: No such file or directory" MinA Slackware 1 09-06-2004 06:36 PM


All times are GMT -5. The time now is 02:40 PM.

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