Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
21
rated 0 times [  21] [ 0]  / answers: 1 / hits: 4607  / 2 Years ago, sun, june 5, 2022, 2:34:12

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:



/bin/cat

More From » files

 Answers
1

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...


[#26266] Monday, June 6, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tionverflow

Total Points: 500
Total Questions: 115
Total Answers: 120

Location: Northern Ireland
Member since Mon, Nov 14, 2022
1 Year ago
;