LinuxQuestions.org
Register a domain and help support LQ
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 03-28-2015, 09:54 AM   #1
MienteBakker
LQ Newbie
 
Registered: Mar 2015
Posts: 1

Rep: Reputation: Disabled
Blanks in file name


How do I cope with file names containing a blank, if I want to rename them?
 
Old 03-28-2015, 09:58 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,362

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
You mean a space?
Either quote it or delimit the space
Code:
ls "file name with spaces"
ls file\ name\ with\ spaces
 
Old 03-28-2015, 10:24 AM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 2,514
Blog Entries: 1

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
A gui file manager is the simple way. Right mouse -> Rename in a lot of cases. Or...

$ mv -- "File With Spaces" File_Without_Spaces

YMMV. The -- basically tells the shell to stop interpreting what follows before passing it along.
 
Old 03-28-2015, 06:32 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,684

Rep: Reputation: 2261Reputation: 2261Reputation: 2261Reputation: 2261Reputation: 2261Reputation: 2261Reputation: 2261Reputation: 2261Reputation: 2261Reputation: 2261Reputation: 2261
Just to be sure, it may be an underscore but you may know that already.


Hello and welcome to LQ.
 
  


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
Screen Blanks Out JMJ_coder *BSD 4 03-27-2007 05:16 PM
Monitor blanks with 10.0 ??? R4ms3s SUSE / openSUSE 3 12-23-2006 11:21 PM
screensaver blanks out TomalakBORG SUSE / openSUSE 7 12-17-2005 01:11 AM
screen blanks during installation madvikas Linux - Hardware 3 06-21-2005 01:55 AM
Monitor blanks out vincebs Mandriva 5 01-16-2004 05:45 PM


All times are GMT -5. The time now is 01:45 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration