Output the first part of a file in ruby.
host = Kanrisuru::Remote::Host.new(host: '127.0.1.1', username: 'ubuntu', keys: ['~/.ssh/id_rsa']) result = host.head('/etc/crontab', lines: 5) result.success? true result.to_a [  "# /etc/crontab: system-wide crontab",  "# Unlike any other crontab you don't have to run the `crontab'",  "# command to install the new version when you edit this file",  "# and files in /etc/cron.d. These files also have username fields,",  "# that none of the other crontabs do." ]
||Required file path to get the contents from.|
||Print the first K bytes of each file; with the leading '-', print all but the last K bytes of each file|
||Print the first K lines instead of the first 10; with the leading '-', print all but the last K lines of each file|
||Can be either append or write options. Determines how content is saved into a file.|
||The name of the newfile to write the content to|
Either returns an array of the first K lines / bytes from the file, or a nil value if a file is being written to.
- Ubuntu, Debian, Centos, Fedora, Redhat, OpenSuse, SLES