Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

stupid question :)

Posted on 2000-05-12
12
Medium Priority
?
336 Views
Last Modified: 2010-04-20
i am using redhat 6.0
my questions is:
1. how to set the time in COMMAND line??
2. how to cancel the shutdown operation?
   i have tried shutdown -c but cannot because i got no prompt to type the command.
3. i read from books that we can shutdown the linux box by using this command:
  shutdown +1
but when i tried, it cannot. So i tried:
    shutdown +1 -h
but it can  make it.

i need brief EXPLANATION on question 2 and 3.

thanks
0
Comment
Question by:anwar12
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
  • 2
12 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2804254
1) See "man date" for setting the clock.

2) Whether or not you can interrupt the shutdown depends on how far shutdown has gone. If it hasn't actually done anything, killing the shutdown process will suffice. You can find the PID by "ps -ef | grep shutdown | grep -v grep" and then "kill shtudownon-PID". If shutdown has actaully started to shut down the system you can't safely interrupt it.

3) See "man shutdown" for a more detailed explanation of the arguments. Basically "shutdown +1" doesn't work because you've not told shutdown what to do, only when.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2804264
Opps, I just now noticed that you are trying to stop shutdown from the terminal that invoked it. In that you can abort it with Ctrl-C.
0
 

Expert Comment

by:sreeramkr
ID: 2805285
i hope u can do a shutdown if u r a root only by default. else if u have permissions "shutdown -h now" will do.

as said above u can use ctrl-c to cancel any command if it hasnt taken effect immediately.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:anwar12
ID: 2805584
but why in my book about redhat linux administrator's handbook set by Mohammed J. Kabir said i can use "shutdown -c" command??and also it is said that i can use only "shutdown +1" command.

About what jlevie said that killing the process. How can i kill?? i even got no prompt after i enter this command.

shutdown -h +3

about using the ctrl c surely can be done.

And another thing when i use X-chat(0.9.4) i cannot connect to the server. it appears messages like this:

*** Looking up irc.efnet.net..
*** Connecting to irc.efnet.net (199.3.235.130) port 6667..
*** Connected. Now logging in..
*** AUTH :*** Looking up your hostname...
*** AUTH :*** Checking Ident
*** AUTH :*** Found your hostname
*** AUTH :*** Got Ident response
*** Closing Link: 203.106.124.152 (You are not authorized to use this server)
*** Disconnected.
*** Looking up irc.ais.net..
*** Connecting to irc-w1.concentric.net (199.2.32.11) port 6667..
*** Connected. Now logging in..
*** Closing Link: wiranto1[root@203.106.124.152] irc.concentric.net (No authorization: -2)
*** Disconnected.
*** Looking up sprynet.us.galaxynet.org..
*** Connecting to freei.us.galaxynet.org (216.225.7.158) port 6667..
*** Connected. Now logging in..
*** AUTH :*** Looking up your hostname
*** AUTH :*** Checking for ident server
*** AUTH :*** Checking for open SOCKS server
*** AUTH :*** Found your hostname
*** AUTH :*** No SOCKS server found
*** AUTH :*** Received identification response
*** Welcome to the Internet Relay Network wiranto1
*** Your host is freei.us.galaxynet.org[galaxynet.freei.net], running version glx2.0.1.(mquit)
*** This server was created Sun Apr 30 2000 at 18:56:18 PDT
*** freei.us.galaxynet.org glx2.0.1.(mquit) dioswkg biklmnopstv
*** There are 3760 users and 3261 invisible on 30 servers
*** 42 :operator(s) online
*** 1 :unknown connection(s)
*** 6279 :channels formed
*** I have 258 clients and 13 servers
-freei.us.galaxynet.org- Highest connection count: 453 (440 clients)
*** MOTD File is missing
-freei.us.galaxynet.org- on 1 ca 1(2) ft 10(10) tr
*** jakarta :No such channel


see... when i connect to efnet it's said that i am not authorized to use this server, when i connect to galaxynet i cannot join any server. when i connect to dalnet i have been autokilled. but when i use windows i can connect to that server.

so any suggestion for me to solve this problem??

thanks alot
0
 

Expert Comment

by:sreeramkr
ID: 2805630
i hope u r taking the question i sleading to some other thing than the one asked previously. u can kill the shutdown with control-c

i fu want to experiment. open another window do a ps -ef|grep shutdown and use the kill command to kill it.
else if u want to use the same window send the shutdown process to background ie by doing ctrl-z and then do the ps......... stuff to kill it.

caution: all this works only if the system hasnt started shutting down.

regarding the book u referred i dont have any idea.


regarding chat client: i hope there will be many users. so it happens sometimes with dalnet. otehr nets i dont have any idea. u can try undernet.
try connecting after it kicks u out. u may succeed
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2806953
"shutdown -c" is intended for use when a shutdown has been scheduled for some point in the future and is either running as a background task or from another terminal. You can accomplish the same thing by fing the PID of the shutdown process and killing that process. "shutdown -c" is just a bit easier to remember.

When you invoke "shutdown -h +60" at the console of course you don't get a prompt back since the shutdown process is running at that terminal. If you do "shutdown -h +60 &", it will run as a background task and you'll get your prompt back. In that case you'd want to use "shutdown -c" (or kill by the PID) to abort the shutdown.

As to the IRC problem... The first server checks your hostname and gets your login ID via ident:

*** AUTH :*** Looking up your hostname..
*** AUTH :*** Checking Ident
*** AUTH :*** Found your hostname
*** AUTH :*** Got Ident response

and decides that the hostname and/or login ID aren't on its list of authorized users. And it tells you so with:

*** Closing Link: 203.106.124.152 (You are not authorized to use this server)

You say that it works from your windows box. Are you using the same login name on Linux that you use on windows? If the IRC server is trully paranoid the hostname of the Linux box would need to be the same as that of the windows box, or you'd need to register the Linux box's hostname with the server.
0
 
LVL 1

Author Comment

by:anwar12
ID: 2813825
about the shutdown u absolutely correct
really great :)
thanks
about the irc, how to solve it jlevie??
should i change the host name of my linux box???
if i should, how to change it??
i don't think i just simply change it in the /etc/passwd file, isn't it??
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2842770
Which is different between windows and Linux? The hostname, the username or both? Is this a dual-boot system running windows & RH, or is the windows box a completely different machine?
0
 
LVL 1

Author Comment

by:anwar12
ID: 2857110
windows and RH running on the same machine. and i am using same login name to the internet.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 800 total points
ID: 2882256
Is the hostname the same when running Linux? If not you'll need to change it to be the hostname of the Windows setup. It's easiest to change in linuxconf. Go to "Config>Networking>Client tasks>Basic host information". The name show on that pane should be localhost.localdomain. Select "Adapter 1" and set "Primary name + domain" to be the hostname of the windows installation.
0
 
LVL 1

Author Comment

by:anwar12
ID: 2897461
Comment accepted as answer
0
 
LVL 1

Author Comment

by:anwar12
ID: 2897462
thanks for the answer jlevie...
and thanks for the comment given.
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question