Ls command is broken, what is going on ?

New to Debian (Or Linux in general)? Ask your questions here!

Ls command is broken, what is going on ?

Postby jibberjabber » 2019-04-03 02:32

This actually started yesterday, but everything I try, and I can not figure out what is going on, when I use the 'ls' command, I get this thing, and it is not funny.
Image
I went to visit a friend, and when I came back , and then used the ls command, it no longer worked. I swear, I did not change anything or do anything.
jibberjabber
 
Posts: 165
Joined: 2016-01-10 16:58

Re: Ls command is broken, what is going on ?

Postby Head_on_a_Stick » 2019-04-03 05:01

Is this a joke?

Your gif shows that sl is being run instead so please post the output of
Code: Select all
alias
echo $0
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10675
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Ls command is broken, what is going on ?

Postby sunrat » 2019-04-03 05:52

April Fool's Day is over. Obviously you have aliased ls to run sl. It's an old prank but a goodie! :lol:
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2918
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Ls command is broken, what is going on ?

Postby jibberjabber » 2019-04-03 12:58

Yea, I know, april fool day is over, but the problem did start on april 1, it is now april 3, and I have not figured out what happened.
Head_on_a_Stick wrote:Is this a joke?
Your gif shows that sl is being run instead so please post the output of
Code: Select all
alias
echo $0

Here is the output:
Code: Select all
jibberjabber@debian:~$ alias
alias ls='ls --color=auto'
jibberjabber@debian:~$ echo $0
bash
jibberjabber@debian:~$ alias echo $0
bash: alias: echo: not found
bash: alias: bash: not found
jibberjabber@debian:~$ 

I was not sure if it should be one line, but as 1 line it did not return anything.
Note, this is Debian 7, my dad installed it to my laptop several years ago. But he is not around right now to help me.
Code: Select all
jibberjabber@debian:~$ cat /etc/issue
Debian GNU/Linux 7 \n \l
Welcome guest, the password for guest
is guest
jibberjabber
 
Posts: 165
Joined: 2016-01-10 16:58

Re: Ls command is broken, what is going on ?

Postby pylkko » 2019-04-03 14:40

A friend did this? You mean Garry?
User avatar
pylkko
 
Posts: 1596
Joined: 2014-11-06 19:02

Re: Ls command is broken, what is going on ?

Postby Wheelerof4te » 2019-04-03 14:55

1. Debian 7 is long dead, unsupported version.
2. apt-get remove sl
3. Your friend installed sl on April's Fools to mess with you.
Wheelerof4te
 
Posts: 1423
Joined: 2015-08-30 20:14

Re: Ls command is broken, what is going on ?

Postby Head_on_a_Stick » 2019-04-03 16:53

How about
Code: Select all
type ls
which -a ls
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10675
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Ls command is broken, what is going on ?

Postby jibberjabber » 2019-04-03 17:26

Code: Select all
jibberjabber@debian:/home$ type ls
ls is aliased to `ls --color=auto'
jibberjabber@debian:/home$ which ls
/bin/ls
jibberjabber@debian:/home$   

Ahh, forgot :
Code: Select all
jibberjabber@debian:/home$ which -a ls
/bin/ls

still shows the same.
RE:
A friend did this?

NO, it happened when I was gone out, visiting a friend, my friend had nothing to do with it. It could have been Garry, he is a pet My Dad is Bryan, and keeps Garry around as a servant, but they are both not here to day, they went to the wilderness, and I don't know when they will be back.
jibberjabber
 
Posts: 165
Joined: 2016-01-10 16:58

Re: Ls command is broken, what is going on ?

Postby Head_on_a_Stick » 2019-04-03 17:38

Curiouser and curiouser...

Let's try
Code: Select all
file /bin/ls
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10675
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Ls command is broken, what is going on ?

Postby jibberjabber » 2019-04-03 17:46

Code: Select all
jibberjabber@debian:/home$ file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xf4b24e078d89dfd39c673c8628300451b0eee4cf, stripped
 
jibberjabber
 
Posts: 165
Joined: 2016-01-10 16:58

Re: Ls command is broken, what is going on ?

Postby Head_on_a_Stick » 2019-04-03 17:54

Scraping the bottom of the barrel here:
Code: Select all
dpkg --audit coreutils
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10675
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Ls command is broken, what is going on ?

Postby jibberjabber » 2019-04-03 18:03

Code: Select all
jibberjabber@debian:~$ dpkg --audit coreutils
dpkg: error: --audit takes no arguments

Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
 
jibberjabber
 
Posts: 165
Joined: 2016-01-10 16:58

Re: Ls command is broken, what is going on ?

Postby jibberjabber » 2019-04-03 18:08

Update:
Thanks H_O_A_S, hope you don't get mad, at this :

Garry and Bryan just got back, and
Bryan, confessed , it was him and put things back the way they should be.
He had actually copied the 'sl' command from /usr/games, to /bin/ls and had
moved the original ls command to another file in /bin/april1 , but I did not notice it, .... made me so mad,... :evil:
When he told me, and then I looked, yes indeed, in /bin/ there is a file named
"april1", and it gives me the 'ls' results as ls would,.. so he just moved "april1" to 'ls', and it is back to normal.
So anyway, I learned some lesson here.
1. Do not leave my PC unattended when logged in.
2.Do not allow root logins for guests.
3. NEVER use the same password for the user and root , or 'su'
3.Never take anything that happens on april 1st to seriously
4. Even a few days after april 1, nobody is safe, it could be that it takes a few days before the victim realizes a prank was played on them.
Last edited by jibberjabber on 2019-04-03 19:44, edited 1 time in total.
jibberjabber
 
Posts: 165
Joined: 2016-01-10 16:58

Re: Ls command is broken, what is going on ?

Postby Head_on_a_Stick » 2019-04-03 18:13

jibberjabber wrote:
Code: Select all
dpkg: error: --audit takes no arguments

The buster version does, sorry about that.

I think plain dpkg --audit would have revealed Garry's misdemeanor, do I get a prize? :mrgreen:

EDIT: why would I be mad? That was an interesting puzzle :)
Don't break DebianHow to report bugs

SharpBang GNU/Linux — a pre-configured Openbox/Tint2 desktop running on Debian stable
User avatar
Head_on_a_Stick
 
Posts: 10675
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Ls command is broken, what is going on ?

Postby jibberjabber » 2019-04-03 20:15

dpkg --audit Just comes up blank, and returns to the prompt.

Glad to see you were not annoyed, or angry, because of the time spent.
But yes you do get the "Best effort" prize,

2. apt-get remove sl

Would not have worked, since the real 'sl' file had been moved to /bin and with the name 'ls' . But 2nd prize, and thanks for the effort.

3. Your friend installed sl on April's Fools to mess with you.

No, it was my Dad, he is very mischievous , Bryan told him to do it, they both are pranksters
jibberjabber
 
Posts: 165
Joined: 2016-01-10 16:58

Next

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable