The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
27 views

Unix cat to Windows user

I uploaded about 6GB of video in 3 separate files created using the cat command on my Mac, thinking the recipient of those files was a Mac user as well. It turns out he's using Windows 8. How can he ...
0
votes
2answers
40 views

linux cat into file including exiting code all from copy+paste

Can I print out a code to STDOUT that would mimic the behavior of Ctrl+c inside cat? E.g. I would like my script to print out the cat command followed by the content of the file like this: cat > ...
0
votes
2answers
42 views

how to clone a directory list to another directory

I am trying clone a directory and it's subdirectories into another directory. I have hundreds of music directories with sub-directories that I want to convert from flac to ogg. I want all the music ...
1
vote
2answers
40 views

Make a web request, cat response to stdout?

I'm working from the command line. I need to cat the response of a web request. What tool can I use to make the web request and print the response on stdout? Here's the command I'm trying to make ...
1
vote
2answers
36 views

Trying to cat the result of piped commands

I have a folder of files that are named list20140801.txt list20140802.txt .... I'm trying to do this ls | sort | tail -3 | cat But it is just giving me the file names, not cat'ing them.
0
votes
1answer
19 views

Sort piped to uniq unexpected output

I have a file that looks like this: "string",192.168.1.0,,TX,192.168.1.2,,,100,0,0,10,10,10,, "string",192.168.1.0,,TX,192.168.1.1,,,100,0,0,10,10,10,, ...
1
vote
2answers
111 views

Adding text to the end of multiple files, minus one line( Adding return 0; at the end of each program in C)

I have a bunch of C programs from K&R and of course, no return statement. I was wondering if there was a way to cat to the end of each file (except one line before the end, so EOF - 1) the ...
0
votes
2answers
156 views

cat wc -l count lines line with defined line endings (e.g Mac OS X specific)

As any command-line user I sometimes want to count lines in text file with well known command: cat some_text_file | wc -l I face the problem on Mac OS X, which as far I have it studied is connected ...
9
votes
1answer
200 views

Security concerns of displaying ssh private key

I've made I huge mistake, or at least I think it is: I've "catted" my private SSH key cat ~/.ssh/id_rsa I'm now afraid that I've created a security hole, allowing other users to see my private key ...
2
votes
2answers
2k 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
vote
1answer
110 views

head and cat don't recognize Microsoft Excel text files

I have a large .xls file with 53760 rows and 19 columns. I saved it as Tab Delimited Text in order to pre-process it through command line tools and load it into R later. However, when I run head ...
0
votes
2answers
130 views

Execute a command for 3 lines at a time

I'm trying to run three separate processed while reading foo.txt Here is the example: cat foo.txt | while read line do echo line1 echo line2 echo line3 echo "" done The expected output is: line1 ...
2
votes
1answer
202 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?
1
vote
3answers
85 views

Move multiple files from filename list to a new folder

I have a list of filename in list.txt, which have 'abc1.png, abc2.png, abc3.png....'. However, I don't know the directories where the files are. I want to find all files in the txt file, and move ...
0
votes
0answers
63 views

Special and diacritic charactres using less, cat and other linux tools

I am using GNU bash, Version 4.1.10(4)-release (i686-pc-cygwin) and set up my .inputrc to allow for special characters and German umlauts etc.: set meta-flag on set convert-meta off set output-meta ...
0
votes
1answer
41 views

How to print statistics from lines in a file

I often find myself computing percentages manually after filtering through a log file to find the proportion of X or Y in it. Can this easily be achieved via common CLI tools?
1
vote
2answers
221 views

Why did my bash prompt turn to gibberish after I accidentally ran `cat` on a .coverage file?

I had just installed coverage and run it a few times when I noticed a .coverage file hanging around in my repo, which is -- according to the file utility -- a 8086 relocatable (Microsoft) file. And ...
0
votes
1answer
240 views

Why does echo work through pipe but not cat with msmtp?

This works: echo "yada yada" | msmtp my@mail.com but not this: cat yadayada.txt | msmtp my@mail.com which delivers the email with empty content. Why does echo work through pipe but not ...
0
votes
2answers
291 views

Copying a template header to multiple existing files

I have a bunch of *.csv files that use headers. Right now the files have headers and the same number of lines of data. I need to erase the data in these files, so I figured I could just overwrite the ...
1
vote
4answers
3k views

How can I stop cat output immediately despite massive output?

I'm looking for someway to stop the output to STDOUT when I realize a command is wrong. For instance, if I accidentally cat a very large file. Usually it will eventually stop if you hold down ctrl + ...
3
votes
3answers
1k views

Is there anyway to `cat` two remote `tail -f` streams via SSH?

I wanted to combine two continuous text streams generated by tail -f into one and watch them in the same screen. Is it possible? Both text streams are line-oriented (e.g. logs), if that helps. ...
1
vote
4answers
1k views

Cannot cat file which has space in name in linux

I believe there's a simple fix but cannot debug it out. I have file called "file name with space" How do I cat this file from Linux bash ?
2
votes
6answers
9k views

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

I know I've found this information before, but can't remember the right google query. I need to transfer an entire linux root filesystem off of a failing hard drive onto another computer with an ...
0
votes
1answer
167 views

Write output to $TMPDIR/$variable : file does not exist (should be created)

I have the following .sh script in which I am trying to do all major writing in $TMPDIR. However, when it gets to line 86, it returns the following error: ...
1
vote
1answer
106 views

How to prepend contents of a file to another

This question relates to the already asked question How to add text to beginning of file The answer suggested by Dennis Williamson does the job: echo 'task goes here' | cat - todo.txt > temp ...
0
votes
1answer
90 views

cat command outputs the whole directory when used in a bash script

I have a scirpt like this: #!/bash/bin file=`cat /proc/net/arp` echo $file And when I run the script it outputs the whole folder where the script is like this: IP address HW type Flags HW address ...
0
votes
1answer
307 views

Combining multiple data files with header while also adding a data column

I have multiple tab delimited data files that are separated by month in the format jan06.txt, feb06.txt, ..., dec07.txt. Within each file, it looks something like: Header1 Header2 Header3 ... Data1 ...
4
votes
5answers
6k views

How to display the file contents recursively?

I always have to submit the source codes in my printed assignment report. I have to copy and paste my course codes into the document and I find that it is an annoying task. I want to solve this "copy ...
1
vote
1answer
84 views

How do I create a new file with text outputted from a command?

I just want to create a file with the outputted text from a command, rather then copying and pasting & making a new file by hand. I'm on a unix machine - how do I do this?
0
votes
1answer
558 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 ...
0
votes
1answer
75 views

What is going wrong with cat

i have a very basic cat problem. I have 23 files, all is one line and around 100000 columns. I am trying to merge these one lines. I type the command cat test1 test2 > outcome The command line is not ...
4
votes
1answer
921 views

Escaping Variable in Cat

I'm trying to write a shell script over ssh via a bash prompt. The shell, however, insists on interpreting any variable I want to write instead of writing it directly to file. For example, cat ...
5
votes
1answer
177 views

Read non-blocking from multiple fifos in parallel

I sometimes sit with a bunch of output fifos from programs that run in parallel. I would like to merge these fifos. The naïve solution is: cat fifo* > output But this requires the first fifo to ...
1
vote
1answer
50 views

Creating a new file that has one line added to to the first line and one line added to the last

I need help or I will do this is python instead (by reading one line at a time) which I know I should not need to. I have large number of text files that I get using find. FILES=$(find ... -iname ...
2
votes
0answers
238 views

Linux: cat /dev/video0 TS into some kind of ring puffer

I want to cat a /dev/video0 device output (Transport Stream) into a temporary ring buffer. In fact i do not want that the file is growing over the time. Simultaneously access is not possible. So the ...
1
vote
1answer
77 views

What to expect in permanent installations of ethernet cable

In my line of work I recently encountered someone who had a DHCP problem, but only with certain hardware and only via certain cables. The cables that we found out caused the problems were in the walls ...
8
votes
1answer
4k 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 ...
5
votes
3answers
3k views

Can I use pipe output as a shell script argument?

Suppose I have a bash shell script called Myscript.sh that need on argument as input. But I want the content of the text file called text.txt to be that argument. I have tried this but it does not ...
3
votes
2answers
262 views

Cat command output varies unusually in regards to * character

I'm running the following command on a fairly standard Ubuntu 11.04 installation running under vSphere: sudo cat /home/*/.ssh/authorized_keys Basically, I am using puppet for ssh key management and ...
46
votes
2answers
50k 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 ...
0
votes
3answers
291 views

What will happen when I 'cat' 'ksh'?

I used the following command in my unix box. $ cat ksh And it gave a rolling log of latin and greek letters and symbols and it kept on going with no signs of stopping. Eventually I had to close my ...
2
votes
4answers
448 views

How could I identify the usable Cat-5 pairs in this mess of torn-out wiring?

When the previous occupants vacated my new lab space they did a number on the Cat-5 wiring that had previously been installed. The baseboard jacks at the other end of this mess appear to be okay, ...
0
votes
2answers
251 views

Join parts of two files together in Bash

I hope to draw on the knowledge of those who know far more about scripting than I. I have two files, F1 and F2, where F2 is located in a sub-directory of F1. I need to output a new file, F3, that ...
2
votes
2answers
1k views

Utility to cat/gunzip a list of files

Is there a commonly-installed Linux utility that will take a list of files and cat or gzip -d (==zcat) them based on whether the file is compressed? An example of where I just needed this is when I ...
1
vote
1answer
156 views

Pass an option syntax string as filename

I somehow got a file named --no-recursion in a directory. How can I get cat to show what it contains? Not like this, since the argument gets interpreted as an option: root@nagini [/home/lalilulelo]# ...
0
votes
1answer
274 views

cat file that contains escaped characters to netcat

I'm trying to test a webserver with some HTTP request written in a file. GET / HTTP/1.1\r\n\r\n Right now I'm feeding that file to netcat like this: cat files | nc localhost 80 However, the \r\n ...
2
votes
2answers
2k 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. ...
0
votes
2answers
376 views

Terminal is Stuck in “cat”

A while back I recall attempting to install an updated version of Ruby on my Mac. I had an interest in the language and thought I would give it a go. I followed detailed instructions that lead me ...
0
votes
3answers
445 views

Scripts shell recording playback

I hope this makes sense. I use 'scripts' to make copies of my ssh sessions for various reasons. When I access the logs via less, etc, I see this: Script started on Mon 12 Sep 2011 08:59:14 AM CDT ...
2
votes
3answers
2k views

How to recursively find a .doc file that contains a specific word?

I'm using bash under Ubuntu. Currently this works well for the current directory: catdoc *.doc | grep "specificword" But I have lots of subdirectories with .doc files. How can I search for, ...