what type does shutdown use to store seconds?
I want to shutdown the pc in 12-13 hours, so we're talking about 43800 seconds. Does shutdown use an int or a short int? I wouldn't want an overflow :)
Also, I remember reading about a command giving the first 10 lines from long lines of input. Can someone tell me which one was? Thanks |
The shutdown command uses minutes, not seconds, so you should be safe from overflows either way.
With the shutdown command, you can either specify the time as HH:MM (giving the clock time, not the length of time to wait), or as +690 to mean “wait 690 minutes from now” The other command you're looking for is probably head, although it defaults to 20 lines. Code:
cat somelongfile | head -n 10 |
Thanks, I hastilly looked at the man page, saw the -t sec option and thought, hmm, it's in seconds. I think I had read about tail, but head will do just as well. Thanks a lot :)
|
The -t option is given to init, which can be used for an additional wait. Basically this can be used to give you shutdown resolution down to a second if you need it. e.g.:
Code:
shutdown -t2 00:01 |
All times are GMT -5. The time now is 11:42 PM. |