Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I lent a friend a computer with Ubuntu 12.04 LTS on it, and he messed up the cat command.

$ cat testfile.txt
cat: meow!

Can someone tell me how to fix this? please?

Output of which cat:

share|improve this question

closed as off-topic by karel, guntbert, chaskes, waltinator, Avinash Raj Apr 3 '14 at 5:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – karel, guntbert, chaskes, waltinator, Avinash Raj
If this question can be reworded to fit the rules in the help center, please edit the question.

Try which cat. If it says something like "siamese" or other cat's species, you friend is a genius. Otherwise, copy the output in your question. – Rmano Mar 31 '14 at 23:02
April fools! Lolz – OrangeTux Mar 31 '14 at 23:07
Please add the results of file /bin/cat and ls -l /bin/cat*. By the way, your "friend" had root access, doesn't he? – Rmano Mar 31 '14 at 23:14
Ah... he did have root access. I checked the file contents: echo "cat: meow" – TheDoctor Mar 31 '14 at 23:15
I didn't expect a question with this title on this SE site ... ;-) – Joey Apr 1 '14 at 8:52
up vote 17 down vote accepted

If he's a friend, he probably did something of the style (as root)(1):

mv /bin/cat /bin/cat.orig 
echo "echo 'cat: meow! '" > /bin/cat
chmod 755 /bin/cat

If he's less of a friend, he omitted the first line.

Asking apt-file

apt-file search -F /bin/cat 

says that the package is coreutils. You can probably reinstall it, although I see it as a bit of a dangerous thing...

(1) well, I really would have added alias which="echo cat: is a siamese" to your .bashrc, but well...

share|improve this answer

It's actually an April Fool's trick. I changed the clock on my Debian box out of April 1st, and it fixed itself. Sick, sick joke...

share|improve this answer
I changed my date to April 1st and tested it on Ubuntu 12.04, no jokes here. – That Brazilian Guy Apr 2 '14 at 16:27
My cat commands are normal today again... Weird, but that's what I found out to fix it :-S – Canadian Luke Apr 2 '14 at 16:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.