ripGrep - duh!
http - curl alternative
bat - cat
fd - find
sk - 'skim' fuzzy finder
For DELL Fan speed:
Use i8kutils:
* sudo apt-get install i8kutils
Try and run:
* /usr/bin/i8kfan
to see what the fans are set at (0/1/2)
To edit i8kconfig:
* sudo vim /etc/i8kmon.conf
To view CPU temps :
* sensors
From this nice puzzle
To figure it out, you can use the -T
flag to strace which tells us how long each system call takes. The number in angle brackets (<......>
) at the end of each line is how long that system call took, in seconds. Here's what that looks like:
$ strace -tt -T -f -p $(pgrep python)15:56:15.517327 accept4(3, {sa_family=AF_INET, sin_port=htons(48564), sin_addr=inet_addr("5.6.7.8")}, [16], SOCK_CLOEXEC) = 4 <1.889267>
15:56:17.407185 getsockname(4, {sa_family=AF_INET, sin_port=htons(8000), sin_addr=inet_addr("1.2.3.4")}, [128->16]) = 0 <0.000018>
Check these files for login history & reason for login fails:
/var/log/auth.log
/var/log/secure
Useful guide on setting up an SFTP server
https://www.techrepublic.com/article/how-to-set-up-an-sftp-server-on-linux/
dd if=giant.json count=3 of=output.json
cat ~/giant.json | jq -cn --stream 'fromstream(1|truncate_stream(inputs))' | jq 'select((.messages | length) > 0)
mv *
` something seemingly weird happens: test3
is there, but the rest is gone. While weird at first, it makes sense once you understand what bash actually passes to `mv`
. Because of the asterisk, bash interprets mv *
as mv test test1 test2 test3
,
and when mv gets that list, it'll assume that the last arguement is the
destination, which is where all of the files would've been moved.