You are not logged in.

#1 2014-01-14 20:45:37

wwn
Member
Registered: 2013-03-25
Posts: 70

[solved] uptime ... command has gone

Hello all,

locate (without an db update) shows me /usr/bin/uptime. A call delivers: "bash: uptime: command not found. There is no uptime in /usr/bin.
How can I restore uptime? Reinstalling bash does not help.

Thx a lot
wwn

Last edited by wwn (2014-01-14 20:52:43)

Offline

#2 2014-01-14 20:49:55

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [solved] uptime ... command has gone

It's not part of bash. Reinstall procps-ng.

Offline

#3 2014-01-14 20:51:23

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: [solved] uptime ... command has gone

Perhaps you should run updatedb so that locate gives correct answers.

Then, check that the correct package is installed:

ewaller$@$odin ~ 1002 %uptime
 12:48:47 up 1 day, 19:35,  4 users,  load average: 0.15, 0.18, 0.21
ewaller$@$odin ~ 1003 %which uptime
/usr/bin/uptime
ewaller$@$odin ~ 1004 %pacman -Qo $(which uptime)
/usr/bin/uptime is owned by procps-ng 3.3.9-1
ewaller$@$odin ~ 1005 %

Edit: Dang, I am slow today hmm   Snaked again....

Last edited by ewaller (2014-01-14 20:52:14)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2014-01-14 20:52:18

wwn
Member
Registered: 2013-03-25
Posts: 70

Re: [solved] uptime ... command has gone

thx a lot. it works.

Offline

#5 2014-01-14 20:52:53

β ™
Member
Registered: 2014-01-12
Posts: 11

Re: [solved] uptime ... command has gone

$ pkgfile uptime
core/procps-ng

Offline

#6 2014-01-14 20:55:24

wwn
Member
Registered: 2013-03-25
Posts: 70

Re: [solved] uptime ... command has gone

ewaller wrote:

pacman -Qo

has been of value wink

Offline

#7 2014-01-14 20:58:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] uptime ... command has gone

@ewaller

$ pacman -Qo uptime
/usr/bin/uptime is owned by procps-ng 3.3.9-1

pacman doesn't need 'which' since version 3.4.0 https://projects.archlinux.org/pacman.g … /NEWS#n373 :-)

Offline

#8 2014-01-14 21:46:32

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,722

Re: [solved] uptime ... command has gone

karol wrote:

pacman doesn't need 'which' since version 3.4.0 https://projects.archlinux.org/pacman.g … /NEWS#n373 :-)

Thanks! good to know. Who says you can't teach an old dog new tricks.
I guess I could have really shown my vintage with pacman -Qo `which uptime`   big_smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#9 2014-01-14 22:21:30

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [solved] uptime ... command has gone

Not an Installation issue, moving to Apps and DEs...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2014-01-14 23:04:57

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [solved] uptime ... command has gone

karol wrote:

pacman doesn't need 'which' since version 3.4.0 https://projects.archlinux.org/pacman.g … /NEWS#n373 :-)

Whoa!  That is great!  I too was still which'ing... though now everything is in /usr/bin.

Offline

#11 2014-01-14 23:20:33

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] uptime ... command has gone

pkgfile is more versatile

$ pacman -Qo mkinitcpio.conf
error: failed to find 'mkinitcpio.conf' in PATH: No such file or directory
$ pacman -Qo /etc/mkinitcpio.conf
/etc/mkinitcpio.conf is owned by mkinitcpio 16-2
$ pkgfile mkinitcpio.conf
core/mkinitcpio
extra/archiso

as locate doesn't search some places by default and pkgfile should be faster than using 'find' to get the full path.

Offline

Board footer

Powered by FluxBB