LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

logsave

executes a command and saves both stdout and stderr to a log file

TLDR

Save command output to log
$ logsave [path/to/logfile] [command]
copy
Save stdin to log
$ logsave [logfile] -
copy
Append to log file
$ logsave -a [logfile] [command]
copy
Run with verbose output
$ logsave -v [logfile] [command]
copy

SYNOPSIS

logsave [options] logfile command [arguments]

DESCRIPTION

logsave executes a command and saves both stdout and stderr to a log file. It includes timestamps and exit status, making it useful for recording the output of scheduled tasks or system scripts.

PARAMETERS

-a

Append to log file instead of replacing
-v
Verbose mode
-
Read from stdin instead of running command

INSTALL

sudo apt install logsave
copy
sudo apk add e2fsprogs-extra
copy

CAVEATS

Part of e2fsprogs package. The log file is created with timestamps for start, end, and command exit status.

SEE ALSO

script(1), tee(1), logger(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid