ls() Netscript Function

ls(hostname/ip[, grep])
Arguments:
  • hostname/ip (string) – Hostname or IP of the target server
  • grep (string) – a substring to search for in the filename
RAM cost:

0 GB

Returns an array with the filenames of all files on the specified server (as strings). The returned array is sorted in alphabetic order