473,378 Members | 1,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

how to open a file which contain space in the file name

hi

i have file called "space in this filename" i have tried to open it with the cat command but it's showing a error massage .
pls if any one know how to open this kind of file let me know
May 11 '15 #1
3 5191
numberwhun
3,509 Expert Mod 2GB
Actually, this is a pretty common thing. If you put a "\" character before the space, you should be able to open it, like so:

Expand|Select|Wrap|Line Numbers
  1. cat ./space\ in\ this\ filename
Also, on linux systems (at a minimum), where you have tab complete functionality, simply typing:

Expand|Select|Wrap|Line Numbers
  1. cat ./space
and then hitting the tab key, should complete the filename for you.

Regards,

Jeff
May 20 '15 #2
computerfox
276 100+
Or the cleaner way, especially when using it in code, use quotes around the name.

For example, "./space in this filename"

and in code, it would look like:

Python
Expand|Select|Wrap|Line Numbers
  1. #!/bin/python
  2. print open('./space in this filename').read();
  3.  
May 21 '15 #3
Quote the commands

eg cat "file name.txt"

Regards,
Christian
https://www.clouddesktoponline.com/
Aug 6 '17 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Philipp | last post by:
Hello I would like to include text from an external file in my html file. This is normally done with <object> or <iframe> but in this case the style sheet and internal links (like <a...
4
by: nan | last post by:
Hi all. Anyone has an idea of how to open a file without know the complete name of it, without opening the directory (with opendir) and test each file? For example, I have this: ...
0
by: GrantS | last post by:
Huys Thanks for your help. Indeed, I did have the correct sytax and was looking in the correct directory. BUT the files were not there by the time I was checking for them. Silly me. Cheers ...
3
by: undshan | last post by:
I am writing a code that needs to open a file, create an output file, run through my function, prints the results to the output file, and closes them within a loop. Here is my code: #include...
5
by: cssExp | last post by:
alright suppose i have the following. <input type="file" name="upload" /> <input type="text" name="discription" /> <input type="image" onclick="addFile();" src="images/addfile.jpg" name="add"...
1
by: mastro78 | last post by:
I'm using 2002 I defined my recordset as rWrkSheet Spreadsheet is the field in table Spreadsheets PathToExcelFiles is the full path where the Excel files i'm ref is stored ExcelFileName is the...
1
by: ephhabte | last post by:
I am learning to python programming and i have some questions about python code . i have tried to write some codes for reading a file from a different database and creating a file if the file...
185
by: jacob navia | last post by:
Hi We are rewriting the libc for the 64 bit version of lcc-win and we have added a new field in the FILE structure: char *FileName; fopen() will save the file name and an accessor function will...
1
by: koneyji | last post by:
I need to read a file from a text box and create a new file using file.create command and the new file should have.enc extension. I tried but can't get it to work. the program goes like this ...
1
by: sdsjohnny | last post by:
I have a weird issue. Can some one help. When I hardcode abc.bin to inputFileName - I can open the file in cpp. But when I pass the same using an optional argument, it fails. Note that in both...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.