Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Create a folder/file and reboot the machine and check for the created file/folder on the location.

by GotToBTru (Prior)
on Mar 13, 2015 at 18:50 UTC ( [id://1119989]=note: print w/replies, xml ) Need Help??


in reply to Re: Create a folder/file and reboot the machine and check for the created file/folder on the location.
in thread reboot a system (machine or server) multiple times with perl script

I don't think you know what a boot partition is. Suggesting that a novice alter his boot partition is tantamount to suggesting he play Russian Roulette with all chambers loaded. Perhaps you meant to say root directory (although where the file resides doesn't really matter).

use warnings; use strict; my $max_attempts = 5; # for windows, replace cat with type my $reboot_number = `cat reboot_attempts` || 0; if ($reboot_number++ < $max_attempts) { `echo $reboot_number > reboot_attempts`; print "Rebooting...\n"; # code to make computer reboot here }
Dum Spiro Spero

Replies are listed 'Best First'.
Re^3: Create a folder/file and reboot the machine and check for the created file/folder on the location.
by james28909 (Deacon) on Mar 13, 2015 at 21:57 UTC
    Apologies, ofcourse i meant boot drive. But in windows, my boot drive is my boot partition, because it is a 512gb ssd unpartitioned.

    Either way the point was to write and/or modify a file per reboot.
Re^3: Create a folder/file and reboot the machine and check for the created file/folder on the location.
by irthiza90 (Novice) on Mar 16, 2015 at 06:45 UTC

    well the o.s here is ubuntu.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1119989]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-03-28 14:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found