Use strict;use warnings;use 5.010;my $filename = '/etc/passwd';my $size = -s $filename;say $size;stat functionAlternatively the stat built-in function of perl returns a 13-element list providing information about thestatus of the file. The 8th element (index 7) is the size of the file.use strict;use warnings;use 5.010;my $filename = '/etc/passwd';my @stat = stat $filename;say $stat7;Fetch list element on-the-flyOf course you don't have to assign the return value of the stat function to an array.We can fetch the element on-the-fly by putting parentheses around the whole expression and then puttingthe element index after that in square bracket: (stat $filename)7;use strict;use warnings;use 5.010;my $filename = '/etc/passwd';my $size = (stat $filename)7;say $size.
![]()
KB ID 0000562 Dtd 22/05/15. I’ve not touched OVF Files since VMware VI3, and as I had to do some work on one of my company’s SAN’s today, and my colleague’s VM was sat in there. I thought I’d use OVF to temporarily backup the Virtual Machine, then after I’d finished messing about with the SAN, I used the OVF file to restore the machine back again. Now that we have the files extracted, we need to bundle them back up into an OVA file. Open up the command prompt and navigate to the OVF Tool install folder. In my case, I had to go to c: Program Files VMware VMware OVF Tool. To repackage the files, run the following command: ovftool.exe Source.ovf Output.OVA. See the image for an example of.
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |