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.

413 votes
3 answers
1.0m views

What is the Windows equivalent of the Unix command cat?

I want to do exactly what unix "cat" does, but on my PC. Is there a simple equivalent command for the Windows command line? Specifically I want to create a file from all the files of a given type in ...
Kirt's user avatar
  • 7,391
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
51 votes
8 answers
13k views

What is the general consensus on "Useless use of cat"?

When I pipe multiple unix commands such as grep, sed, tr etc. I tend to specify the input file that is being processed using cat. So something like cat file | grep ... | awk ... | sed ... . But ...
arunkumar's user avatar
  • 623
42 votes
2 answers
6k views

Why can I cat /dev?

I can cat /dev, I can ls /dev, I can't less /dev. Why does cat let me cat this directory but no other directories?
haboutnnah's user avatar
39 votes
4 answers
56k views

Change Behavior of Linux Power Button

I have a headless linux mint machine that I use for a file server and other things. It's been working great for me for a few years, but there's one issue - my cat likes to hang out on top of it, and ...
schizodactyl's user avatar
38 votes
1 answer
25k views

Why is cat not changing the access time?

The second call to cat a file does not update the access time. I was expecting the access time to be updated ever time a file contents gets displayed. I see the same behaviour if I open the file in ...
nelaaro's user avatar
  • 13.8k
33 votes
3 answers
48k views

Using -replace on pipes in powershell

I want to test out a replace before I use it, so I'm trying to write a quick online command to see what the output is. However, I'm not sure what the syntax is. What I want to do is something like ...
David says Reinstate Monica's user avatar
31 votes
18 answers
86k views

List only the device names of all available network interfaces

I want to get a list of all available Network-Device Names on my Linux server. I figured that ifconfig would do the job, however ifconfig produces quite much output: eth0 Link encap:Ethernet ...
ftiaronsem's user avatar
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
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
21 votes
7 answers
15k views

Cat file to terminal at particular speed of lines per second

I'm lazy and I could write a script to do this, but I'm even too lazy to think of how to do it. I often do things like : cris$ python runexperiment.py > output.txt cris$ cat output.txt ...
Cris Stringfellow's user avatar
20 votes
7 answers
71k views

how to copy entire linux root filesystem to new hard drive on with ssh and tar

I need to transfer an entire linux root filesystem off of a failing hard drive onto another computer with an open, available partition. I've pretty sure this involves tar and ssh, but I can't remember ...
CHK's user avatar
  • 587
20 votes
2 answers
60k views

pipe and stdin redirection to cat

Why does echo "hello world" | cat works while cat < echo "hello world" does not? My (incorrect) intuition is that pipe would redirect stdout to cat as stdin.
irritable_phd_syndrome's user avatar
19 votes
7 answers
55k views

Cat command and echo

I'd like to concatenate the output from echo with content of a file. I've tried the following comand: echo "abc" | cat 1.txt > 2.txt but the 2.txt file only contains the content from 1.txt. Why ...
Ringger81's user avatar
  • 1,267
17 votes
2 answers
6k views

lossless concatenation of ogg vorbis files

I have a couple of ogg vorbis files, all encoded with the exact same properties that I want to concatenate into a single file. I know that the ogg vorbis format supports plain concatenation of ...
josch's user avatar
  • 928

15 30 50 per page
1
2 3 4 5
10