cat binary file -> terminal gibberish


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers cat binary file -> terminal gibberish
# 8  
Old 04-25-2004
What operating system are you using? What shell?
# 9  
Old 04-25-2004
I'm using bash on Linux (Fedora Core 2), but it also happens on Sun Solaris 8 with the tcsh shell.
# 10  
Old 04-25-2004
Sorry if it came across as accusatory, that was definitely not my intent. I was merely asking whether the commands worked on your systems, because I thought it interesting that the same commands that fixed the problem on one system would fail on another. I apoligize for omitting my system details, but I have seen many experienced Unix users (and administrators) accidentally cat (or more) a binary file and react by restarting the terminal. It just seemed like a good idea to me to start a light-hearted discussion about an almost comical problem.

I've seen the problem on the xterm, gnome-terminal (which uses xterm), and dtterm (on Sun, which I think also uses the xterm). Interestingly, on konsole (the kde default terminal which also uses xterm) the terminal doesn't become ruined when cat'ing a binary.

I agree with your description about how it happens. Different binary files seem to affect different sets of characters. The gibberish I get, just like you described, depends on the binary file. Sometimes, with the more command, if you're careful to not page down, you can escape "more" and return with minimal or no gibberish.
# 11  
Old 09-07-2007
Lightbulb

I had the same problem and doing the 'reset' command from the affected terminal (tty1 in my case) did fix it. Smilie
# 12  
Old 01-26-2008
tset or reset should do it in tty. In gnome terminal just select terminal->reset and clear
this works for me
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

2. UNIX for Dummies Questions & Answers

What happens when i write on terminal "cat /bin/ls" ?

i all, i'm trying to understand a code, i see this line cat /bin/ls that have a strange output...can someone explain me what is it? (2 Replies)
Discussion started by: Marina2013
2 Replies

3. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

4. UNIX for Dummies Questions & Answers

gunzip outputs gibberish

I run cygwin on windows 7, and have been using the windows command line. I've been trying to gunzip some previously compressed large sequence output files in .txt.gz format. This worked for about the first 10 files and then for the rest of them the file (as viewed using the 'head' command) is... (1 Reply)
Discussion started by: woceht
1 Replies

5. Solaris

Gibberish when unzipping files in Putty

Hello. I'm ingesting files from one system (db hosted on Solaris 10) to another (db hosted on Solaris 9). Files come in zipped, and contain various txt files, which I'll use SQL*Loader to load. The unzipping, loading etc. is all handled in a ksh shell script. Sadly, we use Putty for all our... (9 Replies)
Discussion started by: Ray Harilal
9 Replies

6. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

Hello, So I sorted my file as I was supposed to: sort -n -r -k 2 -k 1 file1 | uniq > file2 and when I wrote > cat file2 in the command line, I got what I was expecting, but in the script itself ... sort -n -r -k 2 -k 1 averages | uniq > temp cat file2 It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies

7. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

Hi Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX? Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies

8. Solaris

compiled binary file gives "cannot execute binary file"

Hi, I have two Solaris machines. 1. SunOS X 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500 2. SunOS Y 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-60 I am trying to buiild a project on both these machines. The Binary output file compiled on machine 2 runs on both the machines. Where... (0 Replies)
Discussion started by: scgupta
0 Replies
Login or Register to Ask a Question