Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Ls command is broken, what is going on ?

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
jibberjabber
Posts: 162
Joined: 2016-01-10 16:58

Ls command is broken, what is going on ?

#1 Post by jibberjabber »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#2 Post by Head_on_a_Stick »

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
deadbang

User avatar
sunrat
Administrator
Administrator
Posts: 6498
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 118 times
Been thanked: 476 times

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

#3 Post by sunrat »

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!

jibberjabber
Posts: 162
Joined: 2016-01-10 16:58

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

#4 Post by jibberjabber »

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

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#5 Post by pylkko »

A friend did this? You mean Garry?

Wheelerof4te
Posts: 1454
Joined: 2015-08-30 20:14

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

#6 Post by Wheelerof4te »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#7 Post by Head_on_a_Stick »

How about

Code: Select all

type ls
which -a ls
deadbang

jibberjabber
Posts: 162
Joined: 2016-01-10 16:58

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

#8 Post by jibberjabber »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#9 Post by Head_on_a_Stick »

Curiouser and curiouser...

Let's try

Code: Select all

file /bin/ls
deadbang

jibberjabber
Posts: 162
Joined: 2016-01-10 16:58

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

#10 Post by jibberjabber »

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
 

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#11 Post by Head_on_a_Stick »

Scraping the bottom of the barrel here:

Code: Select all

dpkg --audit coreutils
deadbang

jibberjabber
Posts: 162
Joined: 2016-01-10 16:58

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

#12 Post by jibberjabber »

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: 162
Joined: 2016-01-10 16:58

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

#13 Post by jibberjabber »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#14 Post by Head_on_a_Stick »

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 :)
deadbang

jibberjabber
Posts: 162
Joined: 2016-01-10 16:58

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

#15 Post by jibberjabber »

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

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

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

#16 Post by pylkko »

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.

Aaah.. the parrot...

Post Reply