The classical 'ps aux | grep' can do this with one more parameter, the '-v', with means 'NOT' to grep.
Hides the process "your_command" from showing with ps, displaying some other random process name already running for a better camouflage. Show Sample Output
* Output is jq compatible * Output is single lines - unix compatible * Multiple files supported
This will use tput to place the command (date %T in this case) in the upper right corner of the terminal
Installs pip packages defining a proxy
Reviewing the bash history from your latest command to the oldest as you continue pressing the the up key
ffmpeg covert m3u8 to facebook live stream
ffmpeg mp4 to facebook live steam
Place all your venvs in ~/Documents/venvs/, or wherever you please, and quickly activate them by running `pve {name_of_env}`. Place this snippet in your ~/.bash_profile for example.
When decompressing big files it can be nice to know how long you have to go grab coffee. Show Sample Output
This is a bit of a bash hack to catch STDERR and append a log level to it. So for example, if your script has pseudo loglevels like so: echo "INFO - finding files" [ -f ${files} ] || echo "WARN - no files found" Any subcommands that write to STDERR will screw that up Adding 2> >(fb=$(dd bs=1 count=1 2>/dev/null | od -t o1 -A n); [ "$fb" ] && err=$(printf "\\${fb# }"; cat) && echo "ERROR - $err") to the command does the following: 2> Redirect STDERR >( Spawn a subshell (STDERR is then redirected to the file descriptor for this subshell) fb=$(....) get the first byte of input [ "$fb" ] test if there's a first byte && err=$(printf....) save the output to the $err variable && echo "ERROR - $err" append your pseudo loglevel and the error message Heavily borrowed from https://unix.stackexchange.com/questions/33049/check-if-pipe-is-empty-and-run-a-command-on-the-data-if-it-isnt Show Sample Output
It takes the first value of /prov/loadavg to print that many stars followed by the value. Show Sample Output
untar in place with out creating a temporary file
This one uses the history modificator :q to automatically quote previous command. It resolves the already in quotes and by using the single quote it prevents resolving variables on execution. Sample output omits the redirection to file to show the problem essence. Show Sample Output
This will enable the possibility to navigate in the history of the command you type with the arrow keys, example "na" and the arrow will give all command starting by na in the history.You can add these lines to your .bashrc (without &&) to use that in your default terminal.
This uses bash's Process Substitution. It is necessary to give the full path of the file, thus why the filenames are filtered through realpath. In theory, this command should also work with mplayer and mplayer2 (using -playlist instead of --playlist). Modifications: - You can search specific directories by inserting them between "find" and "-type". - Edit the parameter of "-iname" to change the type of file searched for. - Remove everything after "realpath" to play the files in order.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: