Skip to main content
Tweeted twitter.com/#!/StackSuper_User/status/166120576459620353
added 126 characters in body
Source Link
jdg
  • 213
  • 2
  • 7

I accidentally overwrote one of the programs in the /bin directory, and would like to fix it. I am using Ubuntu 11.10, and would like some way to re-install just this file, without having to re-install the whole distribution.

More specificallySpecifically, I accidently typed in the following command:

ls > less

I meant to pipe the output of of ls into the less program for easy viewing, which should have been:

ls | less

The command worked because I was (shame on me) logged in as a super user. I opened up the less file in the /bin directory, and sure enough it is now a text file with the output of my ls command. Is there anyway to fix this? It is especially annoying because I can't view the manual pages for any commands. Thanks for your help, I am just learning Linux.

I accidentally overwrote one of the programs in the /bin directory, and would like to fix it.

More specifically, I accidently typed in the following command:

ls > less

I meant to pipe the output of of ls into the less program for easy viewing, which should have been:

ls | less

The command worked because I was (shame on me) logged in as a super user. I opened up the less file in the /bin directory, and sure enough it is now a text file with the output of my ls command. Is there anyway to fix this? It is especially annoying because I can't view the manual pages for any commands. Thanks for your help, I am just learning Linux.

I accidentally overwrote one of the programs in the /bin directory, and would like to fix it. I am using Ubuntu 11.10, and would like some way to re-install just this file, without having to re-install the whole distribution.

Specifically, I accidently typed in the following command:

ls > less

I meant to pipe the output of of ls into the less program for easy viewing, which should have been:

ls | less

The command worked because I was (shame on me) logged in as a super user. I opened up the less file in the /bin directory, and sure enough it is now a text file with the output of my ls command. Is there anyway to fix this? It is especially annoying because I can't view the manual pages for any commands. Thanks for your help, I am just learning Linux.

Post Migrated Here from stackoverflow.com (revisions)
Source Link
jdg
  • 213
  • 2
  • 7

I accidently overwrote a linux shell program and would like to fix it

I accidentally overwrote one of the programs in the /bin directory, and would like to fix it.

More specifically, I accidently typed in the following command:

ls > less

I meant to pipe the output of of ls into the less program for easy viewing, which should have been:

ls | less

The command worked because I was (shame on me) logged in as a super user. I opened up the less file in the /bin directory, and sure enough it is now a text file with the output of my ls command. Is there anyway to fix this? It is especially annoying because I can't view the manual pages for any commands. Thanks for your help, I am just learning Linux.