A Journal Through My Activities, Thoughts, and Notes
#curl #unixtips
You can use curl to download files in your terminal if you don't have a proper browser.
You can use curl to download files in your terminal if you don't have a proper browser.
# -k equals --insecure, -o equals --output
curl -k -o "filename-you-want-to-save" "url you want to download"
# for example
curl -ko "stackoverflow.html" "https://stackoverflow.com/questions/75612763/downloading-files-with-curl"
#gitbash #unixtips
curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
可以解决 windows 下的 gitbash 没有 jq 可用的问题。
curl -L -o /usr/bin/jq.exe https://github.com/stedolan/jq/releases/latest/download/jq-win64.exe
可以解决 windows 下的 gitbash 没有 jq 可用的问题。
Debian系Linux系统下查看显示器型号信息:
#unixtips
sudo apt install hwinfo # Ubuntu/Debian
hwinfo --monitor | grep -i model
#unixtips
#unixtips
推上读到这个小技巧:Linux系统误将chmod权限改成了000,如何恢复?
答:不用慌,使用ld动态库调用chmod即可恢复。
我在我的 PopOS 22.04上实际测试了一下,目录
!image
推上读到这个小技巧:Linux系统误将chmod权限改成了000,如何恢复?
答:不用慌,使用ld动态库调用chmod即可恢复。
我在我的 PopOS 22.04上实际测试了一下,目录
/lib64
要改成 /lib
, ld-linux-
后面的部分也因系统而异,但这个解决方案确实有效。事实上,你一辈子也可能赶不上一回干这种蠢事,但知道遇到这种情况下仍然有简单的解还是很开心。sudo chmod 000 /usr/bin/chmod
sudo /usr/bin/chmod 755 /usr/bin/chmod
sudo: /usr/bin/chmod: command not found
sudo /lib64/ld-linux-x86-64.so.2 /usr/bin/chmod 755 /usr/bin/chmod
ls -l /usr/bin/chmod
-rwxr-xr-x 1 root root 55816 Feb 8 03:46 /usr/bin/chmod
!image
#unixtips
'Gow (Gnu On Windows) is the lightweight alternative to Cygwin,' <https://github.com/bmatzelle/gow>
and, <https://uutils.github.io> is another choice, which keeps all common utils that are rewritten in rust.
'Gow (Gnu On Windows) is the lightweight alternative to Cygwin,' <https://github.com/bmatzelle/gow>
and, <https://uutils.github.io> is another choice, which keeps all common utils that are rewritten in rust.