Usage of the cat command

brainwave89

macrumors 6502
Original poster
Jul 7, 2006
424
7
How can I use the cat command in terminal to display the contents of a file named sunny windy day.docx?

Thanks for looking.
 

gr8tfly

macrumors 603
Oct 29, 2006
5,298
50
~119W 34N
"cat" will output the file sequentially, so it would work best with plain text. ".docx" is a Word document.

(See the man page for "cat": )
Code:
man cat
Or...

Are you asking why the file isn't recognized because of spaces in the filename? ("cat" still won't work, but the following would help when using a filename with special characters in general)

You can either enter it contained in quotes:
Code:
man "sunny windy day.docx"
Or, by using the '\' character to denote a special character:
Code:
man sunny\ windy\ day.docx
 
Last edited:

jonesea

macrumors newbie
Dec 21, 2013
22
0
How can I use the cat command in terminal to display the contents of a file named sunny windy day.docx?

Thanks for looking.

One way is:
cat "sunny windy day.docx"

But that's a word file, so your going to get lots of junk on the screen.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.