Sha256: 9b2a78a37ef5b7a053903895064b52ba61d6866259248127353056a272091e4e

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

class Lt
  def self.ls
    system("ls")
  end

  def self.cd
    puts "this function is currently not operational"
    dir = gets
    system("cd "+dir)
  end

  def self.cat
    puts "please enter the filename"
    file = gets
    system("cat "+file)
  end

  def self.chmod
    puts "Please enter the mode and the file/directory name(777 /some/directory)"
    file = gets

    system("chmod "+mode+" "+file)
  end

  def self.cp
    puts "please enter the source and destination"
    file = gets
    system("cp "+file)
  end

  def self.date
    system("date")
  end

  def self.df
    system("df -h")
  end

  def self.du
    puts "Enter the path"
    path=gets
    system("du -h "+path)
  end

  def self.kill
    system("ps -e")
    puts "Enter the process id to kill"
    pid=gets
    system("kill "+pid)    
  end

  def self.mkdir
    puts"enter the path"
    mdir=gets
    system("mkdir "+mdir)
  end

  def self.mv
  end

  def self.passwd
  end

  def self.ps
  end

  def self.pwd
  end

  def self.rm
  end

  def self.rmdir
  end

  def self.who
  end

  def self.whoami
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
linux-tools-0.2.1 lib/linux-tools.rb
linux-tools-0.2.0 lib/linux-tools.rb