Skip to main content

Questions tagged [cat]

A UNIX utility for concatenating files or input streams together. Do not use for questions about the animal.

25 votes
4 answers
46k views

Why does this not work? "ls *.txt | xargs cat > all.txt" (all files into single txt document)

Why does this not work? ls *.txt | xargs cat > all.txt (I want to join the contents of all text files into a single 'all.txt' file.) find with -exec should also work, but I would really like to ...
ajo's user avatar
  • 915
3 votes
2 answers
237 views

Why does cat not use options the way I expect UNIX programs to use switches?

I have been a UNIX user for more years than I care to think about, and in that time I have been trained to expect that when contradictory switches are given to a program the last one wins. Recently I ...
Chas. Owens's user avatar
  • 2,562
6 votes
3 answers
16k views

cat on Mac OS X never exits

I'm a bit of a UNIX noob, but I'm trying to run the cat command to make a simple text file and it works great, however cat is never exited after making the file. For instance, I type cat > ~/...
skylerl's user avatar
  • 190
1 vote
3 answers
252 views

accidentally concatenate a large file on a remote system

Every once in a while on a computer I'm ssh'd into, I will accidentally type "cat largefile.txt" and my screen will start rushing with text for the next 10 minutes. I'm always working in a screen ...
Jarvin's user avatar
  • 7,316
23 votes
4 answers
19k views

Are there any options to let cat output with color?

If I want to output a C source code file with syntax highlighting, can I use cat?
Jichao's user avatar
  • 7,590
56 votes
5 answers
96k views

Unix cat starting from line

What is the best way to output from a file starting from a specific line (big number like 70000). Something like: cat --line=70000 <file>
vonhogen's user avatar
  • 2,409
2 votes
2 answers
8k views

Error in the command "cat file | xclip"

The command works with the user "heo". But I get the error by "$ su another_user; cat file | xclip": No protocol specified Error: Can't open display: :0.0 A superuser has black CLI, no error message ...
user avatar
0 votes
3 answers
2k views

Monitor sometimes does not go to sleep on a Mac

I have Mac mini with the latest Leopard + all patches. I've set it up for the monitor to go to sleep after 5 minutes of inactivity, but it just won't turn off. The trouble started last week after ...
AngryHacker's user avatar
  • 18.8k

15 30 50 per page
1
6 7 8 9
10