473,320 Members | 2,145 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,320 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 5189
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.