Questions tagged [cat]
A UNIX utility for concatenating files or input streams together. Do not use for questions about the animal.
11
questions
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 ...
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 ...
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 ...
-1
votes
3
answers
205
views
How to use the command "read" on a Shell script which reads its arguments from stdin
First of all, thank you for your help in advance and sorry in case this was answered before. I have not been able to find it.
For helping to understand my question, I have written the following ...
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 ...
6
votes
1
answer
6k
views
Can cat be used to clone a partition?
For example, can I do:
cat /dev/sda1 > /dev/sda2
instead of using dd, and if not, why will this not work?
6
votes
3
answers
12k
views
Bash "Permission denied" issue when trying to append to EOF
When trying to push a couple lines to the end of a file, I get a permission issue. I understand why I'm getting the error, but I can't think of a way to resolve it. Any help would be appreciated.
...
5
votes
3
answers
1k
views
Is it wasteful to call cat?
I’m sorry if this question is really stupid, but this is basically what I have been thinking about constantly. Suppose I run:
: cat ./somefile.txt
A few hundred times a second. How much faster is my ...
1
vote
1
answer
597
views
echo stdin, unless empty, in which case cat a file
The pipeline fstdraw in.fst | dot -Tpng | convert - -rotate 90 out.png converts a file in a certain binary format into a PNG image.
Unfortunately, in some cases fstdraw emits zero bytes. (A bug in ...
0
votes
1
answer
411
views
What is the Unix equivalent of `cat` for TempleOS?
If I want to cat or a list the contents of a file on the page, what is the TempleOS-equivalent of that command?
0
votes
1
answer
1k
views
Grep with multiple patterns used on the command
A few days ago I installed Centos 7 on my server and run ssh. Now I want to track logs. Is there anyway to combine cat or tail with grep to have clear failed and accepted login attempts list from a ...