Created
April 13, 2018 10:43
-
-
Save petesh/b7394ae6038f4cdaaf9e5fbe0425f453 to your computer and use it in GitHub Desktop.
using ls on the files to ensure that they're present.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
public class simpletest | |
{ | |
static public void Main () | |
{ | |
Console.WriteLine(">>> use ls on the binary <<<"); | |
var psi = new ProcessStartInfo("/bin/ls", "-l /usr/bin/7z"); | |
var proc = new Process() { StartInfo = psi, }; | |
proc.Start(); | |
proc.WaitForExit(); | |
Console.WriteLine(">>> use ls on a missing file <<<"); | |
psi = new ProcessStartInfo("/bin/ls", "-l /usr/bin/7zzz"); | |
proc = new Process() { StartInfo = psi, }; | |
proc.Start(); | |
proc.WaitForExit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment