Comandos Linux - Commands Linux, Tweaks, Tips and Tricks
367 subscribers
5 photos
125 files
40 links
🔰Administre seu Linux, com precisão. Todos comandos de Linux, à sua disposição. Não esqueça. Domine.🔰

► Compartilhar é à nossa Paixão!

🌐 NOSSO BLOG: https://bit.ly/2TLxyFk
🥇 NOSSO PORTAL: @comandos_linux

© 2020 - Equipe FeFacundes SA.

#ti
Download Telegram
━━━━━━━━━⌨️━━━━━━━━
ⒸⓞⓜⓐⓝⓓⓞⓈ ⓁⒾⓃⓊⓍ
━━━━━━━━━━━━━━━━━━━
Cheque a temperatura da CPU e use em painéis como: polybar, lemonbar e tint2
echo "CPU $(cpupower frequency-info | grep -i asserted | cut -c 26-28)$(cpupower frequency-info | grep -i asserted | cut -c 30-33)| $[100-$(vmstat 1 2|tail -1|awk '{print $15}')]% | CPU: $(sensors | grep -i 'Core 0:'| head -n1 | sed -r 's/.*:\s+[\+-]?(.*C)\s+.*/\1/')"
cat /sys/class/thermal/thermal_zone0/temp | column -s $'\t' -t | sed 's/\(.\)..$/.\1ºC/'
paste <(cat /sys/class/thermal/thermal_zone*/type) <(cat /sys/class/thermal/thermal_zone*/temp) | column -s $'\t' -t | sed 's/\(.\)..$/.\1ºC/'
sensors | awk '/Package id 0:/ {print $4}' | sed 's/+//g'
sensors | awk '/[Pp]ackage id 0:/ {print $4}' | sed 's/+//g'
━━━━━━━━━⌨️━━━━━━━━
ⒸⓞⓜⓐⓝⓓⓞⓈ ⓁⒾⓃⓊⓍ
━━━━━━━━━━━━━━━━━━━
Saiba quantas polegadas tem no seu monitor com o seguinte script em Python
#!/usr/bin/env python3
import subprocess
# change the round factor if you like
r = 1

screens = [l.split() for l in subprocess.check_output(
["xrandr"]).decode("utf-8").strip().splitlines() if " connected" in l]

scr_data = []
for s in screens:
try:
scr_data.append((
s[0],
float(s[-3].replace("mm", "")),
float(s[-1].replace("mm", ""))
))
except ValueError:
pass

print(("\t").join(["Screen", "width", "height", "diagonal\n"+32*"-"]))
for s in scr_data:
scr = s[0]; w = s[1]/25.4; h = s[2]/25.4; d = ((w**2)+(h**2))**(0.5)
print(("\t").join([scr]+[str(round(n, 1)) for n in [w, h, d]]))
━━━━━━━━━⌨️━━━━━━━━
ⒸⓞⓜⓐⓝⓓⓞⓈ ⓁⒾⓃⓊⓍ
━━━━━━━━━━━━━━━━━━━
Usem nossa framwork no terminal.

O Shell Utils é um framework educacional projetado para tornar a programação shell acessível e poderosa. É o resultado de um trabalho exaustivo de muitos anos, agora disponível no GitHub. Com mais de 280 scripts documentados, atende tanto iniciantes quanto usuários avançados. Seu grande diferencial é a capacidade de interagir com os principais shells: Bash, Zsh e Fish.

https://github.com/felipefacundes/shell_utils
━━━━━━━━━⌨️━━━━━━━━
ⒸⓞⓜⓐⓝⓓⓞⓈ ⓁⒾⓃⓊⓍ
━━━━━━━━━━━━━━━━━━━