Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 16962

Summary: cat *directory* -> prompt switches to binary
Product: Gentoo Linux Reporter: Manuzhai <manuzhai>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: minor CC: avenj
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Manuzhai 2003-03-06 09:47:53 UTC
When in /usr/share/zoneinfo, I accidentally issued "cat Europe". I got 
binary/weird output (as might be expected), but after that, the prompt 
continued to have weird character output, even after "clear".

Reproducible: Didn't try
Steps to Reproduce:
1. cd /usr/share/zoneinfo
2. cat Europe

Actual Results:  
- Binary output
- Prompt with weird chars
- Anything I typed in weird chars

Expected Results:  
- Binary output
- Normal prompt
Comment 1 Jon Portnoy (RETIRED) gentoo-dev 2003-03-06 11:55:50 UTC
This is typical behavior. When this happens, use the "reset" command to eliminate corruption.

I recommend marking this bug INVALID or CANTFIX.
Comment 2 Jon Portnoy (RETIRED) gentoo-dev 2003-03-06 11:59:12 UTC
Actually, I'm going to reopen this: 'cat' shouldn't work on a directory. It should return 'cat: <directoryname>: Is a directory' instead of producing binary output.

[avenj@cerberus zoneinfo]$ cat Europe
cat: Europe: Is a directory
[avenj@cerberus zoneinfo]$

Can you reproduce this?
Comment 3 Jon Portnoy (RETIRED) gentoo-dev 2003-03-06 12:10:31 UTC
Closed again - if you're actually able to cat directories, file a separate bug under a more relevant subject.

Catting a binary file will always corrupt your terminal, "reset" fixes that. Cat won't open directories by default, though.