<![CDATA[Commands with 3 up-votes]]> http://www.brpent.com/feed/threeup Fri, 25 Dec 2020 02:55:15 +0000 Zend Framework Zend_Feed en-us http://blogs.law.harvard.edu/tech/rss <![CDATA[display information about the CPU]]> aysadk http://www.brpent.com/commands/view/25015/display-information-about-the-cpu http://www.brpent.com/commands/view/25015/display-information-about-the-cpu $ lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)'

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Sat, 19 Sep 2020 17:19:09 +0000 http://www.brpent.com/commands/view/25015/display-information-about-the-cpu
<![CDATA[List all accessed configuration files while executing a program in linux terminal (improved version)]]> knoppix5 http://www.brpent.com/commands/view/24983/list-all-accessed-configuration-files-while-executing-a-program-in-linux-terminal-improved-version http://www.brpent.com/commands/view/24983/list-all-accessed-configuration-files-while-executing-a-program-in-linux-terminal-improved-version $ strace 2>&1 <any_executable> |egrep -o "\".*\.conf\""
Last listed files presumably have higher precedency then files listed first, i.e. configuration files in the personal .config directory will be listed last and their config parameters will be more authoritative then default config parameters defined in /etc directory which are usually listed above them. If you replace ".conf" with ".ini" in the command, initial files will be listed instead of config files. If you do not like to list multiple access to the same config file, pipe to "uniq" or "uniq -c" to prefix lines by the number of occurrences

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Fri, 31 Jul 2020 10:57:29 +0000 http://www.brpent.com/commands/view/24983/list-all-accessed-configuration-files-while-executing-a-program-in-linux-terminal-improved-version
<![CDATA[create an uncompressed tar file of each child directory of the current working directory]]> unixmonkey64021 http://www.brpent.com/commands/view/24967/create-an-uncompressed-tar-file-of-each-child-directory-of-the-current-working-directory http://www.brpent.com/commands/view/24967/create-an-uncompressed-tar-file-of-each-child-directory-of-the-current-working-directory $ find . -maxdepth 1 -mindepth 1 -type d -exec tar cvf {}.tar {} \;
First, use find to find directories exactly one level below current directory, then create a tar file using the directory as the basename.

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Sun, 21 Jun 2020 14:34:44 +0000 http://www.brpent.com/commands/view/24967/create-an-uncompressed-tar-file-of-each-child-directory-of-the-current-working-directory
<![CDATA[Generates a TV noise alike output in the terminal]]> ichbins http://www.brpent.com/commands/view/24930/generates-a-tv-noise-alike-output-in-the-terminal http://www.brpent.com/commands/view/24930/generates-a-tv-noise-alike-output-in-the-terminal $ while true;do printf "$(awk -v c="$(tput cols)" -v s="$RANDOM" 'BEGIN{srand(s);while(--c>=0){printf("\xe2\x96\\%s",sprintf("%o",150+int(10*rand())));}}')";done
Generates a TV noise alike output in the terminal. Can be combined with http://www.brpent.com/commands/view/9728/make-some-powerful-pink-noise

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Fri, 08 May 2020 09:55:36 +0000 http://www.brpent.com/commands/view/24930/generates-a-tv-noise-alike-output-in-the-terminal
<![CDATA[Check if port is open on remote machine]]> jonavon http://www.brpent.com/commands/view/24928/check-if-port-is-open-on-remote-machine http://www.brpent.com/commands/view/24928/check-if-port-is-open-on-remote-machine $ echo > /dev/tcp/127.0.0.123/8085 && echo "Port is open"
Check if port is open, if you don't have ncat on your machine.

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Sun, 03 May 2020 13:30:13 +0000 http://www.brpent.com/commands/view/24928/check-if-port-is-open-on-remote-machine
<![CDATA[Calculate pi to an arbitrary number of decimal places]]> cryptology_codes http://www.brpent.com/commands/view/24900/calculate-pi-to-an-arbitrary-number-of-decimal-places http://www.brpent.com/commands/view/24900/calculate-pi-to-an-arbitrary-number-of-decimal-places $ bc -l <<< "scale=1000; 4*a(1)"

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Wed, 11 Mar 2020 15:58:21 +0000 http://www.brpent.com/commands/view/24900/calculate-pi-to-an-arbitrary-number-of-decimal-places
<![CDATA[stream a youtube video with mpv where $1 is the youtube link.]]> n0a110w http://www.brpent.com/commands/view/24878/stream-a-youtube-video-with-mpv-where-1-is-the-youtube-link. http://www.brpent.com/commands/view/24878/stream-a-youtube-video-with-mpv-where-1-is-the-youtube-link. $ setsid mpv --input-ipc-server=/tmp/mpvsoc$(date +%s) -quiet "$1" >/dev/null 2>&1
opens a new session with video stream

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Mon, 10 Feb 2020 12:35:11 +0000 http://www.brpent.com/commands/view/24878/stream-a-youtube-video-with-mpv-where-1-is-the-youtube-link.
<![CDATA[Massive change of file extension (bash)]]> rgawenda http://www.brpent.com/commands/view/24864/massive-change-of-file-extension-bash http://www.brpent.com/commands/view/24864/massive-change-of-file-extension-bash $ for file in *.txt; do mv "${file%.txt}{.txt,.xml}"; done
Using bash parameters expansion

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Thu, 23 Jan 2020 08:54:34 +0000 http://www.brpent.com/commands/view/24864/massive-change-of-file-extension-bash
<![CDATA[Print your cpu intel architecture family]]> wuziduzi http://www.brpent.com/commands/view/24855/print-your-cpu-intel-architecture-family http://www.brpent.com/commands/view/24855/print-your-cpu-intel-architecture-family $ cat /sys/devices/cpu/caps/pmu_name

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Wed, 01 Jan 2020 04:57:27 +0000 http://www.brpent.com/commands/view/24855/print-your-cpu-intel-architecture-family
<![CDATA[Poor man's ntpdate]]> casueps (http://juanpalomez.wordpress.com) http://www.brpent.com/commands/view/24846/poor-mans-ntpdate http://www.brpent.com/commands/view/24846/poor-mans-ntpdate $ date -s "$(curl -sD - www.example.com | grep '^Date:' | cut -d' ' -f3-6)Z"

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Fri, 20 Dec 2019 10:10:14 +0000 http://www.brpent.com/commands/view/24846/poor-mans-ntpdate
<![CDATA[get all Google ipv4/6 subnets for a iptables firewall for example (updated version)]]> emphazer http://www.brpent.com/commands/view/24840/get-all-google-ipv46-subnets-for-a-iptables-firewall-for-example-updated-version http://www.brpent.com/commands/view/24840/get-all-google-ipv46-subnets-for-a-iptables-firewall-for-example-updated-version $ for NETBLOCK in $(echo _netblocks.google.com _netblocks2.google.com _netblocks3.google.com); do nslookup -q=TXT $NETBLOCK ; done | tr " " "\n" | grep ^ip[46]: | cut -d: -f2- | sort
google has added 2 more netblocks...

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Mon, 16 Dec 2019 07:09:12 +0000 http://www.brpent.com/commands/view/24840/get-all-google-ipv46-subnets-for-a-iptables-firewall-for-example-updated-version
<![CDATA[Show all current listening programs by port and pid with SS instead of netstat]]> symgryph http://www.brpent.com/commands/view/24834/show-all-current-listening-programs-by-port-and-pid-with-ss-instead-of-netstat http://www.brpent.com/commands/view/24834/show-all-current-listening-programs-by-port-and-pid-with-ss-instead-of-netstat $ ss -plunt

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Mon, 09 Dec 2019 17:44:55 +0000 http://www.brpent.com/commands/view/24834/show-all-current-listening-programs-by-port-and-pid-with-ss-instead-of-netstat
<![CDATA[Show top 50 running processes ordered by highest memory/cpu usage refreshing every 1s]]> jgleeson http://www.brpent.com/commands/view/24824/show-top-50-running-processes-ordered-by-highest-memorycpu-usage-refreshing-every-1s http://www.brpent.com/commands/view/24824/show-top-50-running-processes-ordered-by-highest-memorycpu-usage-refreshing-every-1s $ watch -n1 "ps aux --sort=-%mem,-%cpu | head -n 50"
http://alvinalexander.com/linux/unix-linux-process-memory-sort-ps-command-cpu for an overview of --sort available values

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Tue, 03 Dec 2019 20:51:03 +0000 http://www.brpent.com/commands/view/24824/show-top-50-running-processes-ordered-by-highest-memorycpu-usage-refreshing-every-1s
<![CDATA[Print all git repos from a user]]> wuziduzi http://www.brpent.com/commands/view/24728/print-all-git-repos-from-a-user http://www.brpent.com/commands/view/24728/print-all-git-repos-from-a-user $ curl -s https://api.github.com/users/<username>/repos?per_page=1000 |grep git_url |awk '{print $2}'| sed 's/"\(.*\)",/\1/'

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Tue, 19 Nov 2019 20:31:19 +0000 http://www.brpent.com/commands/view/24728/print-all-git-repos-from-a-user
<![CDATA[create a nicely formatted example of a shell command and its output]]> bartonski http://www.brpent.com/commands/view/24726/create-a-nicely-formatted-example-of-a-shell-command-and-its-output http://www.brpent.com/commands/view/24726/create-a-nicely-formatted-example-of-a-shell-command-and-its-output $ example() { echo "EXAMPLE:"; echo; echo " $@"; echo; echo "OUTPUT:"; echo ; eval "$@" | sed 's/^/ /'; }
Shell function which takes a bash command as its input, and displays the following formatted output: EXAMPLE: command OUTPUT: output from command

commandlinefu.com

Diff your entire server config at ScriptRock.com

]]>
Sun, 10 Nov 2019 19:08:23 +0000 http://www.brpent.com/commands/view/24726/create-a-nicely-formatted-example-of-a-shell-command-and-its-output
国产片av在线观看国语_亚洲欧美aⅴ在线资源_亚洲国产综合自在线