- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: it could not use commd "shutdown"
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 12:18 AM
08-10-2010 12:18 AM
it could not use command shutdown as below:
# shutdown -r y 0
sh: shutdown: not found.
so I add shutdown shell into PATH as below, but it is not still used ,
#export PATH=$PATH:/sbin/shutdown
pls see my path environment below,
echo $PATH
/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/ipf/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/bin/X11:/opt/resmon/bin:/opt/perf/bin:/usr/contrib/kwdb/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/opt/prm/bin:/opt/sfm/bin:/opt/upgrade/bin:/opt/wlm/bin:/opt/ots/bin:/opt/ots/lbin:/opt/sas/bin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/firefox:/opt/gnome/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/gwlm/bin:/usr/contrib/bin/X11:/sbin:/home/root=/usr/sbin/shutdown:/sbin/shutdown
who can give some thread to solve it, thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 12:30 AM
08-10-2010 12:30 AM
Re: it could not use commd "shutdown"
Can you try to use root id to execute the shutdown command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 12:35 AM
08-10-2010 12:35 AM
Re: it could not use commd "shutdown"
Uid as below:
# who am i
root pts/tc Aug 10 09:18
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 12:39 AM
08-10-2010 12:39 AM
Re: it could not use commd "shutdown"
/usr/sbin/shutdown -r y 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 12:41 AM
08-10-2010 12:41 AM
Re: it could not use commd "shutdown"
Can you post the output
ll /sbin/shutdown and ll /usr/sbin/shutdown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 12:47 AM
08-10-2010 12:47 AM
Re: it could not use commd "shutdown"
the full path is the same to fail,
pls see below,
#ll /usr/sbin/shutdown
lrwxrwxr-x 1 root bin 14 Jul 3 23:23 /usr/sbin/shutdown -> /sbin/shutdown
# ll /sbin/shutdown
/sbin/shutdown not found
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 12:49 AM
08-10-2010 12:49 AM
Re: it could not use commd "shutdown"
can you post the output of ls -ld /sbin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 12:52 AM
08-10-2010 12:52 AM
Re: it could not use commd "shutdown"
ls -ld /sbin
dr-xr-xr-x 15 bin bin 8192 Dec 21 2009 /sbin
ll /sbin/shutdown
-r-sr-xr-x 1 root bin 754340 Aug 27 2004 /sbin/shutdown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 01:14 AM
08-10-2010 01:14 AM
Re: it could not use commd "shutdown"
# ls -ld
dr-xr-xr-x 31 bin bin 8192 Aug 10 16:41 .
how to solve it ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 01:18 AM
08-10-2010 01:18 AM
Re: it could not use commd "shutdown"
Can you post the output of ls -ld /sbin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 01:22 AM
08-10-2010 01:22 AM
Re: it could not use commd "shutdown"
the same output with yours,
# ls -ld /sbin
dr-xr-xr-x 13 bin bin 8192 Jul 4 01:26 /sbin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 01:26 AM
08-10-2010 01:26 AM
Re: it could not use commd "shutdown"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 01:29 AM
08-10-2010 01:29 AM
Re: it could not use commd "shutdown"
Thanks for your reply,
But why I need to do the backup?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 01:34 AM
08-10-2010 01:34 AM
Re: it could not use commd "shutdown"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 01:51 AM
08-10-2010 01:51 AM
Re: it could not use commd "shutdown"
As me understand, I need to backup due to miss the file of /sbin/shutdown, so even if I add its path enviroment the problem is stil exist!
If I can copy it from the other machine ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 01:56 AM
08-10-2010 01:56 AM
Re: it could not use commd "shutdown"
Ensure there is no other files were missing under /sbin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 01:58 AM
08-10-2010 01:58 AM
Re: it could not use commd "shutdown"
Thanks for your nice reminding!
I only need to compare the size with other machine ? if it is ok?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 02:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 02:07 AM
08-10-2010 02:07 AM
Re: it could not use commd "shutdown"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 03:14 AM
08-10-2010 03:14 AM
Re: it could not use commd "shutdown"
This should have the directory path, not the path to the executable. And your $PATH does have /sbin and /usr/sbin.
>I only need to compare the size with other machine?
Ideally you would compare the checksums with cksum(1). Make sure you copy the permissions and owners when you copy that file.
You can also use "swverify \*" to find other missing files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2010 11:31 PM
08-10-2010 11:31 PM
Re: it could not use commd "shutdown"
Thanks for you so nice support!
Hi Dennis,
>#export PATH=$PATH:/sbin/shutdown
This should have the directory path, not the path to the executable. And your $PATH does have /sbin and /usr/sbin.
---I check my $path including /sbin and /usr/sbin as below, and how to understand "This should have the directory path, not the path to the executable"?
please give your support, thanks !
echo $PATH
/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/pe
rl/bin:/opt/ipf/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/b
in/X11:/opt/resmon/bin:/opt/perf/bin:/usr/contrib/kwdb/bin:/opt/wbem/bi
n:/opt/wbem/sbin:/opt/graphics/common/bin:/opt/prm/bin:/opt/sfm/bin:/o
pt/upgrade/bin:/opt/wlm/bin:/opt/ots/bin:/opt/ots/lbin:/opt/sas/bin:/opt/
sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/firefox:/opt/gno
me/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/sec_mgmt/sp
c/bin:/opt/ssh/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/g
wlm/bin:/usr/contrib/bin/X11:/sbin:/home/root=/usr/sbin/shutdown:/sbin/
shutdown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2010 12:11 AM
08-11-2010 12:11 AM
Re: it could not use commd "shutdown"
please be reminded to assign point if the info is helpful!!.
GOOD LUCK!!
Warren
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2010 01:30 AM
08-11-2010 01:30 AM
Re: it could not use commd "shutdown"
The colon separated components in $PATH must be directories, otherwise they would be ignored.
So these aren't valid:
/home/root=/usr/sbin/shutdown:/sbin/shutdown
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2010 02:09 AM
08-11-2010 02:09 AM
Re: it could not use commd "shutdown"
Thanks for your reply, but I feel little confused for PATH,
For example, how to add comand (one full path) to specified enviroment parameter so that I do not need to execute this command with full path, how to do it ?
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2010 02:26 AM
08-11-2010 02:26 AM
Re: it could not use commd "shutdown"
If your command is in directory /abc/DIR, you use:
PATH=$PATH:/abc/DIR