package osutil
import "github.com/tredoe/osutil"
Index ¶
- Variables
- func Exec(cmd string, args ...string) error
- func ExecSudo(cmd string, args ...string) error
- func MustbeRoot() error
- func Sudo() error
Variables ¶
Functions ¶
func Exec ¶
Exec executes a command setting both standard input, output and error.
func ExecSudo ¶
ExecSudo executes a command under "sudo".
func MustbeRoot ¶
func MustbeRoot() error
MustbeRoot returns an error message if the user is not root.
func Sudo ¶
func Sudo() error
Sudo executes command "sudo". If some command needs to use "sudo", then could be used this function at the beginning so there is not to wait until that it been requested later.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
config | |
config/env | Package env implements the setting of persistent environment variables. |
config/shconf | Package shconf implements a parser and scanner for the configuration in format shell-variable. |
distro | Package distro detects the Linux distribution. |
file | Package file handles common operations in files. |
internal | |
pkgutil | Package pkgutil handles basic operations in the management of packages in operating systems. |
sh | Package sh interprets a command line just like it is done in the Bash shell. |
user | Package user provides access to UNIX users database in local files. |
user/crypt | Package crypt provides interface for password crypt functions and collects common constants. |
user/crypt/apr1_crypt | Package apr1_crypt implements the standard Unix MD5-crypt algorithm created by Poul-Henning Kamp for FreeBSD, and modified by the Apache project. |
user/crypt/common | Package common contains routines used by multiple password hashing algorithms. |
user/crypt/md5_crypt | Package md5_crypt implements the standard Unix MD5-crypt algorithm created by Poul-Henning Kamp for FreeBSD. |
user/crypt/sha256_crypt | Package sha256_crypt implements Ulrich Drepper's SHA256-crypt password hashing algorithm. |
user/crypt/sha512_crypt | Package sha512_crypt implements Ulrich Drepper's SHA512-crypt password hashing algorithm. |
- Version
- v1.5.0 (latest)
- Published
- Jun 4, 2024
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 1 day ago –
Tools for package owners.