Trait

fr.janalyse.ssh

AllOperations

Related Doc: package ssh

Permalink

trait AllOperations extends ShellOperations with TransfertOperations

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AllOperations
  2. TransfertOperations
  3. ShellOperations
  4. SSHLazyLogging
  5. CommonOperations
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def catData(data: String, filespec: String): Boolean

    Permalink

    data to specified filespec

    data to specified filespec

    Definition Classes
    ShellOperations
  2. abstract def execute(cmd: SSHCommand): String

    Permalink

    Execute the current command and return the result as a string

    Execute the current command and return the result as a string

    cmd

    command to be executed

    returns

    result string

    Definition Classes
    ShellOperations
  3. abstract def executeWithStatus(cmd: SSHCommand): (String, Int)

    Permalink

    Execute the current command and return the result as a string and exit code tuple

    Execute the current command and return the result as a string and exit code tuple

    cmd

    command to be executed

    returns

    A tuple made of the result string and the exit code

    Definition Classes
    ShellOperations
  4. abstract def get(remoteFilename: String): Option[String]

    Permalink

    get remote file content as an optional String

    get remote file content as an optional String

    remoteFilename

    file content to get

    returns

    Some content or None if file was not found

    Definition Classes
    TransfertOperations
  5. abstract def getBytes(remoteFilename: String): Option[Array[Byte]]

    Permalink

    get remote file content as an optional bytes array

    get remote file content as an optional bytes array

    remoteFilename

    file content to get

    returns

    Some content or None if file was not found

    Definition Classes
    TransfertOperations
  6. abstract def options: SSHOptions

    Permalink

    get current SSH options

    get current SSH options

    returns

    used ssh options

    Definition Classes
    ShellOperations
  7. abstract def put(data: String, remoteDestination: String): Unit

    Permalink

    upload string content to a remote file, if file already exists, it is overwritten

    upload string content to a remote file, if file already exists, it is overwritten

    data

    content to upload in the remote file

    remoteDestination

    remote destination

    Definition Classes
    TransfertOperations
  8. abstract def putBytes(data: Array[Byte], remoteDestination: String): Unit

    Permalink

    upload bytes array content to a remote file, if file already exists, it is overwritten

    upload bytes array content to a remote file, if file already exists, it is overwritten

    data

    content to upload in the remote file

    remoteDestination

    remote destination

    Definition Classes
    TransfertOperations
  9. abstract def putFromStream(data: InputStream, howmany: Int, remoteDestination: String): Unit

    Permalink

    upload bytes coming from the input stream to a remote file, if file already exists, it is overwritten

    upload bytes coming from the input stream to a remote file, if file already exists, it is overwritten

    data

    input stream

    howmany

    how much data to write to remote destination

    remoteDestination

    remote destination

    Definition Classes
    TransfertOperations
  10. abstract def receive(remoteFilename: String, outputStream: OutputStream): Unit

    Permalink

    Copy a remote file to a local one

    Copy a remote file to a local one

    remoteFilename

    Source file name (on remote system)

    outputStream

    Destination stream (local system)

    Definition Classes
    TransfertOperations
  11. abstract def send(fromLocalFile: File, remoteDestination: String): Unit

    Permalink

    Copy a local file to a remote one

    Copy a local file to a remote one

    fromLocalFile

    Source file (local system)

    remoteDestination

    Destination file name (on remote system)

    Definition Classes
    TransfertOperations

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def alive(): Boolean

    Permalink

    get dir name

    get dir name

    returns

    directory name

    Definition Classes
    ShellOperations
  5. def arch: String

    Permalink

    get server architecture string

    get server architecture string

    returns

    server architecture

    Definition Classes
    ShellOperations
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def basename(name: String, suffix: String): String

    Permalink

    get base name

    get base name

    name

    a name

    suffix

    filename suffix

    returns

    base name

    Definition Classes
    ShellOperations
  8. def basename(name: String): String

    Permalink

    get base name

    get base name

    name

    a name

    returns

    base name

    Definition Classes
    ShellOperations
  9. def cat(filenames: List[String]): String

    Permalink

    Get contents of a list of files

    Get contents of a list of files

    filenames

    get the content of this list of filenames

    returns

    files contents concatenation

    Definition Classes
    ShellOperations
  10. def cat(filename: String): String

    Permalink

    Get the content of a file

    Get the content of a file

    filename

    get the content of this filename

    returns

    file content

    Definition Classes
    ShellOperations
  11. def cd(dirname: String): Unit

    Permalink

    Change current working directory to the specified directory Of course this requires a persistent shell session to be really useful...

    Change current working directory to the specified directory Of course this requires a persistent shell session to be really useful...

    dirname

    directory name

    Definition Classes
    ShellOperations
  12. def cd: Unit

    Permalink

    Change current working directory to home directory Of course this requires a persistent shell session to be really useful...

    Change current working directory to home directory Of course this requires a persistent shell session to be really useful...

    Definition Classes
    ShellOperations
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def date(): Date

    Permalink

    Get remote date, as a java class Date instance (minimal resolution = 1 second)

    Get remote date, as a java class Date instance (minimal resolution = 1 second)

    returns

    The remote system current date as a java Date class instance

    Definition Classes
    ShellOperations
  15. def dirname(name: String): String

    Permalink

    get dir name

    get dir name

    name

    a filename

    returns

    directory name

    Definition Classes
    ShellOperations
  16. def disableHistory(): Unit

    Permalink

    Disable shell history, the goal is to not add noises to your shell history, to keep your shell commands history clean.

    Disable shell history, the goal is to not add noises to your shell history, to keep your shell commands history clean.

    Definition Classes
    ShellOperations
  17. def du(filename: String): Option[Long]

    Permalink

    Remote tree file size in kilobytes

    Remote tree file size in kilobytes

    filename

    file name

    returns

    optional file tree size in kilobytes, or None if filename was not found

    Definition Classes
    ShellOperations
  18. def echo(message: String): String

    Permalink

    echo something and return back what has been printed

    echo something and return back what has been printed

    message

    to print

    returns

    printed message

    Definition Classes
    ShellOperations
  19. def env: Map[String, String]

    Permalink

    remote environment variables

    remote environment variables

    returns

    map of environment variables

    Definition Classes
    ShellOperations
  20. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  22. def executeAndTrim(cmd: SSHCommand): String

    Permalink

    Execute the current command and return the result as a trimmed string

    Execute the current command and return the result as a trimmed string

    cmd

    command to be executed

    returns

    result string

    Definition Classes
    ShellOperations
  23. def executeAndTrimSplit(cmd: SSHCommand): Iterable[String]

    Permalink

    Execute the current command and return the result as a trimmed splitted string

    Execute the current command and return the result as a trimmed splitted string

    cmd

    command to be executed

    returns

    result string

    Definition Classes
    ShellOperations
  24. def exists(filename: String): Boolean

    Permalink

    Does specified filename exist ?

    Does specified filename exist ?

    filename

    file name

    returns

    True if file exists

    Definition Classes
    ShellOperations
  25. def fileRights(path: String): Option[String]

    Permalink

    get file rights string (such as 'drwxr-xr-x')

    get file rights string (such as 'drwxr-xr-x')

    returns

    rights string

    Definition Classes
    ShellOperations
  26. def fileSize(filename: String): Option[Long]

    Permalink

    Remote file size in bytes

    Remote file size in bytes

    filename

    file name

    returns

    optional file size, or None if filename was not found

    Definition Classes
    ShellOperations
  27. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. def findAfterDate(root: String, after: Date): Iterable[String]

    Permalink

    Find file modified after the given date (Warning, minimal resolution = 1 minute)

    Find file modified after the given date (Warning, minimal resolution = 1 minute)

    root

    Search for file from this root directory

    after

    Date parameter

    returns

    list of paths (relative to root) modified after the specified date

    Definition Classes
    ShellOperations
  29. def fsFreeSpace(path: String): Option[Double]

    Permalink

    File system remaining space in MB

    File system remaining space in MB

    returns

    fs freespace in Mb if the path is valid

    Definition Classes
    ShellOperations
  30. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  31. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  32. def hostname: String

    Permalink

    Get remote host name

    Get remote host name

    returns

    host name

    Definition Classes
    ShellOperations
  33. def id: String

    Permalink

    Get used id information

    Get used id information

    returns

    user id data

    Definition Classes
    ShellOperations
  34. def isDirectory(filename: String): Boolean

    Permalink

    Is file name a directory

    Is file name a directory

    filename

    file name

    returns

    True if file is a directory

    Definition Classes
    ShellOperations
  35. def isExecutable(filename: String): Boolean

    Permalink

    Is filename executable ?

    Is filename executable ?

    filename

    file name

    returns

    True if file is executable

    Definition Classes
    ShellOperations
  36. def isFile(filename: String): Boolean

    Permalink

    Is file name a regular file

    Is file name a regular file

    filename

    file name

    returns

    True if file is a regular file

    Definition Classes
    ShellOperations
  37. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  38. def kill(pids: Iterable[Int]): Unit

    Permalink

    kill specified processes

    kill specified processes

    Definition Classes
    ShellOperations
  39. def lastModified(filename: String): Option[Date]

    Permalink

    Remote file last modified date (TZ is taken into account)

    Remote file last modified date (TZ is taken into account)

    filename

    file name

    returns

    optional date, or None if filename was not found

    Definition Classes
    ShellOperations
  40. def localmd5sum(filename: String): Option[String]

    Permalink

    locale file md5sum

    locale file md5sum

    filename

    file name

    returns

    md5sum as an optional String, or None if filename was not found

    Definition Classes
    CommonOperations
  41. val logger: Logger

    Permalink
    Definition Classes
    SSHLazyLogging
  42. def ls(dirname: String): Iterable[String]

    Permalink

    List files in specified directory

    List files in specified directory

    dirname

    directory to look into

    returns

    current directory files as an Iterable

    Definition Classes
    ShellOperations
  43. def ls(): Iterable[String]

    Permalink

    List files in specified directory

    List files in specified directory

    returns

    current directory files as an Iterable

    Definition Classes
    ShellOperations
  44. def md5sum(filename: String): Option[String]

    Permalink

    Remote file md5sum

    Remote file md5sum

    filename

    file name

    returns

    md5sum as an optional String, or None if filename was not found

    Definition Classes
    ShellOperations
  45. def mkcd(dirname: String): Boolean

    Permalink

    Create a new directory and enter it

    Create a new directory and enter it

    returns

    true if the directory was successfully created and we were able to enter it

    Definition Classes
    ShellOperations
  46. def mkdir(dirname: String): Boolean

    Permalink

    Create a new directory

    Create a new directory

    returns

    true if the directory was successfully created

    Definition Classes
    ShellOperations
  47. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  48. def notExists(filename: String): Boolean

    Permalink

    Does specified filename not exist ?

    Does specified filename not exist ?

    filename

    file name

    returns

    True if file does'nt exist

    Definition Classes
    ShellOperations
  49. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  50. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  51. def osid: OS

    Permalink

    *nix os name (linux, aix, sunos, darwin, ...)

    *nix os name (linux, aix, sunos, darwin, ...)

    returns

    remote *nix system name

    Definition Classes
    ShellOperations
  52. def osname: String

    Permalink

    *nix os name (linux, aix, sunos, darwin, ...)

    *nix os name (linux, aix, sunos, darwin, ...)

    returns

    remote *nix system name

    Definition Classes
    ShellOperations
  53. def pidof(regex: Regex): List[Int]

    Permalink

    get pid of all processes matching the given command line regular expression

    get pid of all processes matching the given command line regular expression

    Definition Classes
    ShellOperations
  54. def ps(): List[Process]

    Permalink

    list active processes of unix like systems

    list active processes of unix like systems

    returns

    system processes list

    Definition Classes
    ShellOperations
  55. def pwd(): String

    Permalink

    Get current working directory

    Get current working directory

    returns

    current directory

    Definition Classes
    ShellOperations
  56. def receive(filename: String): Unit

    Permalink

    Copy a remote file to a local one using the same filename

    Copy a remote file to a local one using the same filename

    filename

    file name

    Definition Classes
    TransfertOperations
  57. def receive(remoteFilename: String, localFilename: String): Unit

    Permalink

    Copy a remote file to a local one

    Copy a remote file to a local one

    remoteFilename

    Source file name (on remote system)

    localFilename

    Destination file name (local system)

    Definition Classes
    TransfertOperations
  58. def receive(remoteFilename: String, toLocalFile: File): Unit

    Permalink

    Copy a remote file to a local one

    Copy a remote file to a local one

    remoteFilename

    Source file name (on remote system)

    Definition Classes
    TransfertOperations
  59. def receiveNcompress(remoteFilename: String, localDirectory: File, localBasename: String): File

    Permalink

    Copy and compress (if required) a remote file to a local one

    Copy and compress (if required) a remote file to a local one

    remoteFilename

    Source file name (on remote system)

    localDirectory

    Destination directory

    returns

    local file used

    Definition Classes
    TransfertOperations
  60. def receiveNcompress(remoteFilename: String, localFilename: String): File

    Permalink

    Copy and compress (if required) a remote file to a local one

    Copy and compress (if required) a remote file to a local one

    remoteFilename

    Source file name (on remote system)

    returns

    local file used

    Definition Classes
    TransfertOperations
  61. def rm(files: Iterable[String]): Unit

    Permalink

    delete files

    delete files

    Definition Classes
    ShellOperations
  62. def rm(file: String): Unit

    Permalink

    delete a file

    delete a file

    Definition Classes
    ShellOperations
  63. def rmdir(dirs: Iterable[String]): Boolean

    Permalink

    delete directories (directories must be empty)

    delete directories (directories must be empty)

    Definition Classes
    ShellOperations
  64. def rmdir(dir: String): Boolean

    Permalink

    delete directory (directory must be empty)

    delete directory (directory must be empty)

    Definition Classes
    ShellOperations
  65. def rreceive(remote: String, dest: File): Unit

    Permalink

    Recursively get a remote directory to a local destination

    Recursively get a remote directory to a local destination

    remote

    remote path, file or directory.

    dest

    local destination directory, it it doesn't exist then it is created

  66. def rsend(src: File, remote: String): Unit

    Permalink

    Recursively send a local directory to a remote destination

    Recursively send a local directory to a remote destination

    src

    local path, file or directory

    remote

    remote destination directory, if it doesn't exist then it is created

  67. def send(filename: String): Unit

    Permalink

    Copy a local file to a remote one using the same name

    Copy a local file to a remote one using the same name

    filename

    file name

    Definition Classes
    TransfertOperations
  68. def send(fromLocalFilename: String, remoteDestination: String): Unit

    Permalink

    Copy a local file to a remote one

    Copy a local file to a remote one

    fromLocalFilename

    Source file name (local system)

    remoteDestination

    Destination file name (on remote system)

    Definition Classes
    TransfertOperations
  69. def sha1sum(filename: String): Option[String]

    Permalink

    Remote file sha1sum

    Remote file sha1sum

    filename

    file name

    returns

    sha1sum as an optional String, or None if filename was not found

    Definition Classes
    ShellOperations
  70. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  71. def test(that: String): Boolean

    Permalink

    Generic test (man test, for arguments)

    Generic test (man test, for arguments)

    that

    condition

    returns

    True if condition is met

    Definition Classes
    ShellOperations
  72. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  73. def touch(files: String*): Unit

    Permalink

    touch

    touch

    files

    list of files to touch

    Definition Classes
    ShellOperations
  74. def uname: String

    Permalink

    *nix system name (Linux, AIX, SunOS, ...)

    *nix system name (Linux, AIX, SunOS, ...)

    returns

    remote *nix system name

    Definition Classes
    ShellOperations
  75. def uptime: String

    Permalink

    get host up time, example formats : Linux : 21:34:17 up 33 min, 5 users, load average: 0.18, 0.27, 0.30 21:29:38 up 473 days, 22:21, 1 user, load average: 0.09, 0.04, 0.00 Darwin : 21:28 up 53 mins, 3 users, load averages: 1.40 1.49 1.52

    get host up time, example formats : Linux : 21:34:17 up 33 min, 5 users, load average: 0.18, 0.27, 0.30 21:29:38 up 473 days, 22:21, 1 user, load average: 0.09, 0.04, 0.00 Darwin : 21:28 up 53 mins, 3 users, load averages: 1.40 1.49 1.52

    Definition Classes
    ShellOperations
  76. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  77. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  78. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  79. def which(command: String): Option[String]

    Permalink

    get command location on filesystem, based on current PATH

    get command location on filesystem, based on current PATH

    command

    the name of the command

    returns

    full command path option or None if the command is not in the current PATH

    Definition Classes
    ShellOperations
  80. def whoami: String

    Permalink

    who am I ?

    who am I ?

    returns

    current user name

    Definition Classes
    ShellOperations

Deprecated Value Members

  1. def execute[I <: Iterable[String]](commands: I)(implicit bf: CanBuildFrom[I, String, I]): I

    Permalink

    Execute a collection of commands and returns the associated result collections

    Execute a collection of commands and returns the associated result collections

    commands

    commands collection

    returns

    commands executions results collection

    Definition Classes
    ShellOperations
    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.14)

  2. def executeAll(cmds: SSHBatch): Iterable[String]

    Permalink

    Execute the current batch (list of commands) and return the result as a string collection

    Execute the current batch (list of commands) and return the result as a string collection

    cmds

    batch to be executed

    returns

    result string collection

    Definition Classes
    ShellOperations
    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.14)

  3. def executeAllAndTrim(cmds: SSHBatch): Iterable[String]

    Permalink

    Execute the current batch (list of commands) and return the result as a string collection

    Execute the current batch (list of commands) and return the result as a string collection

    cmds

    batch to be executed

    returns

    result trimmed string collection

    Definition Classes
    ShellOperations
    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.14)

  4. def executeAllAndTrimSplit(cmds: SSHBatch): Iterable[Array[String]]

    Permalink

    Execute the current batch (list of commands) and return the result as a string collection

    Execute the current batch (list of commands) and return the result as a string collection

    cmds

    batch to be executed

    returns

    result trimmed splitted string collection

    Definition Classes
    ShellOperations
    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.14)

  5. def executeAndContinue(cmd: SSHCommand, cont: (String) ⇒ Unit): Unit

    Permalink

    Execute the current command and pass the result to the given code

    Execute the current command and pass the result to the given code

    cmd

    command to be executed

    cont

    continuation code

    Definition Classes
    ShellOperations
    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.14)

Inherited from TransfertOperations

Inherited from ShellOperations

Inherited from SSHLazyLogging

Inherited from CommonOperations

Inherited from AnyRef

Inherited from Any

Ungrouped