find an executable

osprey

New Member
Joined
Apr 15, 2022
Messages
8
Reaction score
7
Credits
63
I acquired a computer running debian bookworm.
On running the command "weather" there's a result.
I want to find where the executable is on the system to alter it.
The problem is that I can't find where it is.
Everything I've tried is in the commands below.
It's not in the usual /bin, /usr/bin, /sbin, /usr/sbin.
It's not locateable in the locate database.
What other commands can I use to find it, or how to find it?
Code:
[[email protected] ~]$ weather
Weather report: wellington

     \  /       Partly cloudy
   _ /"".-.     18 °C          
     \_(   ).   ↓ 46 km/h      
     /(___(__)  10 km          
                0.1 mm         
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  Sat 16 Apr ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│  _`/"".-.     Patchy rain po…│  _`/"".-.     Patchy rain po…│     \   /     Clear          │     \   /     Clear          │
│   ,\_(   ).   16 °C          │   ,\_(   ).   15 °C          │      .-.      +15(13) °C     │      .-.      +15(14) °C     │
│    /(___(__)  ↘ 46-62 km/h   │    /(___(__)  ↘ 46-68 km/h   │   ― (   ) ―   ↓ 27-47 km/h   │   ― (   ) ―   ↙ 16-27 km/h   │
│      ‘ ‘ ‘ ‘  10 km          │      ‘ ‘ ‘ ‘  10 km          │      `-’      10 km          │      `-’      10 km          │
│     ‘ ‘ ‘ ‘   0.1 mm | 89%   │     ‘ ‘ ‘ ‘   0.1 mm | 75%   │     /   \     0.0 mm | 0%    │     /   \     0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
[[email protected] ~]$ which weather
[[email protected] ~]$ whereis weather
[[email protected] ~]$ echo $PATH
/home/dav/.local/bin:/home/dav/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
[[email protected] ~]$ ls /bin | grep weather
[[email protected] ~]$ ls /sbin |grep weather
[[email protected] ~]$ ls /usr/local/bin |grep weather
[[email protected] ~]$ ls /usr/local/games |grep weather
[[email protected] ~]$ ls /usr/games |grep weather
[[email protected] ~]$ ls /home/dav/.local/bin |grep weather
[[email protected] ~]$ apropos weather
weather: nothing appropriate.
[[email protected] ~]$ locate weather
/usr/lib/python3/dist-packages/youtube_dl/extractor/__pycache__/theweatherchannel.cpython-39.pyc
/usr/lib/python3/dist-packages/youtube_dl/extractor/theweatherchannel.py
/usr/lib/x86_64-linux-gnu/lxpanel/plugins/weather.so
/usr/share/icons/Adwaita/16x16/status/weather-clear-night-symbolic.symbolic.png
....
 


KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
5,769
Reaction score
5,206
Credits
46,570
LOL That's because it's an alias. That weather "app" isn't an app at all. It's an online thing. It's likely aliased - in your ~/.bash_aliases is where it should be.

I actually wrote about it in an article a while back.

 
OP
O

osprey

New Member
Joined
Apr 15, 2022
Messages
8
Reaction score
7
Credits
63
Thanks KGill. I found it in the .bashrc. Hadn't thought to run the command "alias" which would have found it, so thanks for that.
 

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
7,113
Reaction score
5,990
Credits
23,535
G'day @osprey and welcome to linux.org from DownUnder :)

You can actually even sometimes drop the State, for example with David G.'s @KGIII 's example

curl wttr.in/rangeley

will produce an output.

It can be a 3 - 4 day forecast.

I was about to respond but my friend beat me to it.

Cheers

Chris Turner
wizardfromoz
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
5,769
Reaction score
5,206
Credits
46,570
'Snot a problem. See the article for more choices.

I also strongly suggest using .bash_aliases instead of putting things into the .bashrc. If something goes awry, it's constrained to the aliases file. They're also more portable, meaning you can take them from OS to OS. The .bash_aliases file I am currently using is at least a decade old - having been updated over the years but keeping things consistent between operating systems.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
5,769
Reaction score
5,206
Credits
46,570
Also, I could see why that'd be frustrating. If I hadn't known already, I don't know that I'd have thought 'alias' at first. I just happened to know from the article and 'cause I use it from time to time.
 
OP
O

osprey

New Member
Joined
Apr 15, 2022
Messages
8
Reaction score
7
Credits
63
Thanks KGill for the heads up on .bash_aliases. On reading your link I can see that that was probably the source for this alias.
Thanks for the welcome wizardfromoz.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Latest posts

Top