notes with tags:
terminal
id |
text |
url |
tags |
updated_at |
5203 |
crontab rsync use ssh agent - Google Search |
https://www.google.com/search?hl=en&q=crontab%20rsync%20use%20ssh%20agent |
terminal
|
18 hours ago |
2212 |
borg exclude
```
*.DS_Store
*.pyc
*.class
**.venv
**.mypy_cache
**.ruff_cache
**.pytest_cache
**/.dvc/cache
**/.dvc/tmp
**.idea
**.vscode
**/__pycache__
**/node_modules
**/navidrome/data/cache
```
exclude if present:
```
CACHEDIR.TAG
``` |
|
terminal
tools
backups
|
13 days ago |
5100 |
Обновляем ключи для apt |
https://tyvik.ru/posts/apt-key-migrate/ |
terminal
|
18 days ago |
3338 |
# syslog journald `journalctl`
Note that most current Linux distributions use journald, rather than syslog.
```
echo 'hello' | systemd-cat -p info
echo 'hello' | systemd-cat -t someapp
journalctl -t someapp
journalctl -t CRON
journalctl --identifier CRON
journalctl -f
journalctl -t CRON --since yesterday
journalctl --since now|today|yesterday|tomorrow --until YYYY-MM-DD HH:MM:SS
journalctl -o json
journalctl -o json-pretty
journalctl --utc # display the timestamps in UTC
journalctl -b # entries that have been collected since the most recent reboot.
```
- [`logger`](https://unix.stackexchange.com/questions/393097/the-simple-but-correct-way-to-have-a-bash-script-send-output-to-systemd-journal) is much more flexible
- [logger(1) - Linux manual page](https://man7.org/linux/man-pages/man1/logger.1.html)
```
tldr logger
logger
Add messages to syslog (/var/log/syslog).
More information: https://manned.org/logger.
- Log a message to syslog:
logger message
- Take input from stdin and log to syslog:
echo log_entry | logger
- Send the output to a remote syslog server running at a given port. Default port is 514:
echo log_entry | logger --server hostname --port port
- Use a specific tag for every line logged. Default is the name of logged in user:
echo log_entry | logger --tag tag
- Log messages with a given priority. Default is `user.notice`. See `man logger` for all priority options:
echo log_entry | logger --priority user.warning
```
```
>>> import syslog
>>> syslog.syslog('hello')
```
- [syslog — Unix syslog library routines — Python 3.11.0 documentation](https://docs.python.org/3/library/syslog.html)
- [python syslog - Google Search](https://www.google.com/search?hl=en&q=python%20syslog)
- [python syslog tag - Google Search](https://www.google.com/search?q=python+syslog+tag&newwindow=1&hl=en&ei=dDVmY7DMJPqG9u8PzYGO-AY&oq=python+syslog+tag&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQARgAMgUIABCABDIGCAAQFhAeMgUIABCGAzIFCAAQhgMyBQgAEIYDOgoIABBHENYEELADOgcIABCwAxBDSgQITRgBSgQIQRgASgQIRhgAULoCWKcNYOITaAFwAXgAgAGMAYgBiwSSAQMwLjSYAQCgAQHIAQrAAQE&sclient=gws-wiz-serp)
- [How to configure logging to syslog in Python? - Stack Overflow](https://stackoverflow.com/questions/3968669/how-to-configure-logging-to-syslog-in-python)
```
syslog.openlog('foo')
syslog.syslog('bar')
syslog.closelog()
journalctl -t foo # works
```
- [python - How to change the 'tag' when logging to syslog from 'Unknown'? - Stack Overflow](https://stackoverflow.com/questions/9542465/how-to-change-the-tag-when-logging-to-syslog-from-unknown/32432947#32432947)
- [docker container write to syslog - Google Search](https://www.google.com/search?hl=en&q=docker%20container%20write%20to%20syslog)
- [syslog vs journald - Google Search](https://www.google.com/search?q=syslog+vs+journald)
- [python write to journald at DuckDuckGo](https://duckduckgo.com/?q=python+write+to+journald&ia=web)
- [syslog | Search powered by Algolia](https://hn.algolia.com/?query=syslog&sort=byPopularity&prefix&page=0&dateRange=all&type=story)
- [journald - Google Search](https://www.google.com/search?hl=en&q=journald)
- [Telegram: Contact @advice17](https://t.me/advice17/36)
- [How To Use Journalctl to View and Manipulate Systemd Logs | DigitalOcean](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs) |
https://www.freedesktop.org/software/systemd/man/systemd-cat.html |
terminal
|
22 days ago |
5042 |
ZFS for Dummies | Hacker News |
https://news.ycombinator.com/item?id=37387392 |
terminal
|
27 days ago |
5029 |
# ps1
- [zsh bash ps1 ps2 ps3 - Google Search](https://www.google.com/search?newwindow=1&client=safari&rls=en&sxsrf=ACYBGNTAwYK_pOcWolWZReLlTqgNdC7GJQ%3A1570037049235&ei=Od2UXff5DeXamwXWuqZw&q=zsh+bash+ps1+ps2+ps3&oq=zsh+bash+PS1+ps2&gs_l=psy-ab.3.0.33i22i29i30.80115.86717..88014...0.2..0.256.2137.12j6j1......0....1..gws-wiz.......0i71j35i39j0i67j0j0i7i30j0i7i10i30j0i8i7i30j0i8i30.mbQMa0QBo0I)
- [how to change ps1 variable in unix - Google Search](https://www.google.com/search?q=how+to+change+ps1+variable+in+unix&oq=how+to+change+ps1+va&aqs=chrome.1.69i57j0.4777j0j3&sourceid=chrome&ie=UTF-8)
- [ps1 maker - Google Search](https://www.google.com/search?q=ps1+maker&oq=ps1+maker&aqs=chrome..69i57j0l5.6944j0j4&sourceid=chrome&ie=UTF-8)
- [ps1 generator - Google Search](https://www.google.com/search?q=ps1+generator&oq=PS1+generator&aqs=chrome.0.0l3j69i60l3.326j0j4&sourceid=chrome&ie=UTF-8)
|
|
terminal
|
29 days ago |
4962 |
envsubst - Google Search |
https://www.google.com/search?hl=en&q=envsubst |
terminal
|
2023 Aug 29 16:39 |
4933 |
GNU Parallel, where have you been all my life? | Hacker News |
https://news.ycombinator.com/item?id=37208083 |
terminal
|
2023 Aug 21 12:34 |
4923 |
Tmux has forever changed the way I write code [video] | Hacker News |
https://news.ycombinator.com/item?id=37172711 |
terminal
|
2023 Aug 18 10:57 |
4817 |
fstab unconnected drive boot stucks - Google Search
- [fstab nobootwait - Google Search](https://www.google.com/search?hl=en&q=fstab%20nobootwait) |
https://www.google.com/search?hl=en&q=fstab%20unconnected%20drive%20boot%20stucks |
terminal
|
2023 Aug 11 07:08 |
4713 |
shell vs environment variables (and env, export, etc.) (intermediate) anthony explains #547 - YouTube |
https://www.youtube.com/watch?v=h36Xc38SDHg |
terminal
tools
|
2023 Jul 29 13:48 |
4476 |
Tell HN: People forget that you can stick any data at the end of a bash script | Hacker News |
https://news.ycombinator.com/item?id=36605869 |
terminal
|
2023 Jul 06 03:19 |
4443 |
macOS command-line tools you might not know about | Hacker News |
https://news.ycombinator.com/item?id=36491704 |
terminal
macos
|
2023 Jun 28 10:07 |
4437 |
Everything that uses configuration files should report where they're located | Hacker News |
https://news.ycombinator.com/item?id=36465886 |
coding
terminal
|
2023 Jun 25 18:27 |
4433 |
fix `mkkernel` in dotfiles |
|
terminal
todo-2
|
2023 Jun 25 16:58 |
4416 |
Move from `.bash_profile` back to `.bashrc`
Кстати, вот то, что когда включаешь tmux в первый раз после перезагрузки на Mac'е и у тебя там не работает типа mktmpenv, mkvirtlenv, короче всякие алиасы разные и надо делать source.bash.profile, это возможно, потому что все перенес из bash.rc в bash.profile короче перенести обратно в bash.rc мозги не бать |
|
terminal
todo
|
2023 Jun 25 09:47 |
4398 |
Filenames and pathnames in shell: How to do it correctly (2020) | Hacker News |
https://news.ycombinator.com/item?id=36388825 |
terminal
|
2023 Jun 20 10:00 |
4222 |
How to Create a .Desktop File for Your Application in Linux - Make Tech Easier
- [command line - Change Default Applications from Script - Ask Ubuntu](https://askubuntu.com/questions/1030281/change-default-applications-from-script)
Update `bash $dot/symlinks.sh`
```
ln -sfv "$dot/bin/OpenJupyter.desktop" ~/.local/share/applications
```
Probably (seems like this is not necessary) add chmod:
```
chmod +x bin/OpenJupyter.desktop
```
```
$ mimetype Untitled.ipynb
Untitled.ipynb: application/x-ipynb+json
$ subl ~/.config/mimeapps.list
```
add following line to `[Default Applications]` section
```
application/x-ipynb+json=OpenJupyter.desktop
``` |
https://www.maketecheasier.com/create-desktop-file-linux/ |
python
terminal
tools
|
2023 Apr 08 06:54 |
4068 |
Learn Vim (2021) | Hacker News |
https://news.ycombinator.com/item?id=34930113 |
terminal
|
2023 Feb 25 09:10 |
4069 |
The Missing Semester of Your CS Education | Hacker News |
https://news.ycombinator.com/item?id=34934216 |
coding
terminal
|
2023 Feb 25 09:10 |
4021 |
linuxserver/docker-openssh-server |
https://github.com/linuxserver/docker-openssh-server |
coding
terminal
tools
|
2023 Feb 20 21:26 |
3993 |
dandavison/delta: A syntax-highlighting pager for git, diff, and grep output |
https://github.com/dandavison/delta |
tools
terminal
git
|
2023 Feb 13 08:39 |
3981 |
sharkdp/fd: A simple, fast and user-friendly alternative to 'find' |
https://github.com/sharkdp/fd |
terminal
|
2023 Feb 08 17:24 |
3961 |
syslog-ng vs. systemd’s journald - openSUSE News
- [syslog-ng - Google Search](https://www.google.com/search?hl=en&q=syslog%2Dng) |
https://news.opensuse.org/2018/04/30/syslog-ng-vs-systemds-journald/ |
terminal
|
2023 Feb 05 15:31 |
3952 |
casey/just: 🤖 Just a command runner |
https://github.com/casey/just |
coding
terminal
tools
|
2023 Feb 05 07:52 |
3925 |
rsyslog at DuckDuckGo |
https://duckduckgo.com/?q=rsyslog&ia=web |
coding
terminal
tools
|
2023 Feb 03 12:33 |
3920 |
psutil · PyPI |
https://pypi.org/project/psutil/ |
python
terminal
|
2023 Feb 03 10:59 |
3875 |
ripgrep/GUIDE.md at master · BurntSushi/ripgrep |
https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#automatic-filtering |
terminal
|
2023 Jan 24 06:53 |
3803 |
service example rpi_fan_control/fan_control.service at master · paulwinex/rpi_fan_control |
https://github.com/paulwinex/rpi_fan_control/blob/master/fan_control.service |
terminal
|
2023 Jan 12 08:21 |
3802 |
kubectl exec - Google Search |
https://www.google.com/search?hl=en&q=kubectl%20exec |
terminal
|
2023 Jan 12 08:18 |
3784 |
Textutils - Free Software Directory |
https://directory.fsf.org/wiki/Textutils |
terminal
|
2023 Jan 09 08:53 |
3622 |
Explain find's -path and -prune options - Unix & Linux Stack Exchange |
https://unix.stackexchange.com/questions/376075/explain-finds-path-and-prune-options |
terminal
|
2022 Dec 25 08:38 |
3538 |
Getting Started with Tmux | Hacker News |
https://news.ycombinator.com/item?id=33943537 |
terminal
|
2022 Dec 11 14:03 |
3496 |
A Vim Guide for Advanced Users | Hacker News |
https://news.ycombinator.com/item?id=33811705 |
terminal
|
2022 Dec 01 11:51 |
3488 |
Keyboard Shortcuts every Command Line Hacker should know about GNU Readline | Hacker News |
https://news.ycombinator.com/item?id=33785631 |
terminal
|
2022 Nov 29 12:25 |
3438 |
ssh-agent forwarding tmux at DuckDuckGo |
https://duckduckgo.com/?q=ssh-agent+forwarding+tmux&ia=web |
terminal
|
2022 Nov 19 06:16 |
3432 |
adduser vs useradd at DuckDuckGo |
https://duckduckgo.com/?q=adduser+vs+useradd&ia=web |
terminal
|
2022 Nov 18 18:46 |
3430 |
Introduction to the Ext4 File System for Linux - YouTube |
https://www.youtube.com/watch?v=B6kg2zeJ9do&list=WL&index=4&t=2887s |
terminal
|
2022 Nov 17 15:22 |
3428 |
6 устаревших команд Linux и инструменты, которые пришли им на замену / Хабр |
https://habr.com/ru/company/ncloudtech/blog/699536/ |
terminal
|
2022 Nov 17 14:45 |
3384 |
you can use `set` or `declare` to print full information about loaded functions, envs, aliases etc |
|
terminal
|
2022 Nov 12 08:04 |
3344 |
btrfs - YouTube |
https://www.youtube.com/results?search_query=btrfs |
terminal
|
2022 Nov 05 12:28 |
3296 |
btrfs vs zfs - Google Search |
https://www.google.com/search?hl=en&q=btrfs%20vs%20zfs |
terminal
|
2022 Nov 01 07:46 |
3293 |
mdadm - Google Search |
https://www.google.com/search?hl=en&q=mdadm |
terminal
|
2022 Oct 31 16:04 |
3292 |
systemd vs cron - Google Search |
https://www.google.com/search?hl=en&q=systemd%20vs%20cron |
terminal
|
2022 Oct 31 16:02 |
3287 |
How to Format Disk Partitions in Linux {ext4, NTFS and FAT32} |
https://phoenixnap.com/kb/linux-format-disk |
terminal
|
2022 Oct 30 14:28 |
3273 |
Watchman A file watching service | Watchman |
https://facebook.github.io/watchman/ |
terminal
tools
|
2022 Oct 29 10:58 |
3259 |
Asdf – language tool version manager | Hacker News |
https://news.ycombinator.com/item?id=33323261 |
terminal
|
2022 Oct 27 08:05 |
3212 |
rclone | Search powered by Algolia |
https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=rclone&sort=byPopularity&type=story |
terminal
|
2022 Oct 22 06:22 |
3204 |
Pipe Viewer | Hacker News |
https://news.ycombinator.com/item?id=33244768 |
terminal
|
2022 Oct 19 18:21 |
3172 |
Home | Task |
https://taskfile.dev/ |
coding
terminal
tools
|
2022 Oct 16 15:20 |
3165 |
Homebrew Shell Completion — Homebrew Documentation |
https://docs.brew.sh/Shell-Completion |
terminal
macos
|
2022 Oct 16 07:13 |
3141 |
bash fc - Google Search |
https://www.google.com/search?hl=en&q=bash%20fc |
terminal
|
2022 Oct 13 08:21 |
3122 |
Расширенное использование SSH / Хабр |
https://habr.com/ru/company/cloud4y/blog/692076/ |
terminal
networks
|
2022 Oct 12 10:47 |
3095 |
Leap: Neovim’s Answer to the Mouse | Hacker News |
https://news.ycombinator.com/item?id=33134113 |
terminal
|
2022 Oct 08 18:33 |
3079 |
Поддержка Сайтов :: Метод Лаб - YouTube |
https://www.youtube.com/channel/UCf1P_nESQ6hPlTwkH5Vik1A/videos |
coding
terminal
persons
|
2022 Oct 07 05:26 |
3080 |
Kirill Semaev - YouTube |
https://www.youtube.com/c/KirillSemaev/videos |
coding
terminal
persons
|
2022 Oct 07 05:26 |
3012 |
iptables - Google Search |
https://www.google.com/search?tbm=isch&q=iptables&tbs=imgo:1 |
terminal
networks
|
2022 Sep 20 16:14 |
3009 |
shell - How to check if a variable is set in Bash - Stack Overflow |
https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash |
terminal
|
2022 Sep 20 13:22 |
3008 |
Иван Глазков - YouTube |
https://www.youtube.com/c/vanohaker/videos |
coding
terminal
networks
|
2022 Sep 20 10:55 |
2987 |
sudo apt -y install exfatprogs |
|
terminal
|
2022 Sep 18 12:29 |
2986 |
Linux command line for you and me | Hacker News |
https://news.ycombinator.com/item?id=32886315 |
terminal
|
2022 Sep 18 12:11 |
2890 |
Unofficial guide to dotfiles on GitHub | Hacker News |
https://news.ycombinator.com/item?id=32632533 |
terminal
|
2022 Aug 29 08:55 |
2887 |
pipewire clicks - Google Search |
https://www.google.com/search?hl=en&q=pipwire%20clicks |
dsp
terminal
|
2022 Aug 29 06:53 |
2877 |
`ffprobe -print_format json -show_streams video.mp4` |
|
dsp
terminal
|
2022 Aug 28 06:09 |
2454 |
Лекция 6. IPC overview (Архитектура операционной системы на примере Linux) - YouTube |
https://www.youtube.com/watch?v=6wDBOjaajuk&list=WL&index=103 |
terminal
|
2022 Jul 27 12:53 |
2417 |
How to Create a systemd Linux Service - YouTube |
https://www.youtube.com/watch?v=C4a7jxlMTfo |
terminal
|
2022 Jul 27 12:03 |
2368 |
My 5 Favorite Linux Shell Tricks for SPEEEEEED (and efficiency) - YouTube |
https://www.youtube.com/watch?v=V8EUdia_kOE |
terminal
|
2022 Jul 27 08:14 |
2356 |
Introduction to Advanced Bash Usage - James Pannacciulli @ OSCON 2014 - YouTube |
https://www.youtube.com/watch?v=uqHjc7hlqd0 |
terminal
|
2022 Jul 27 08:10 |
2355 |
Linux Sysadmin Basics -- User Account Management - YouTube |
https://www.youtube.com/watch?v=UN1QB5BIvps |
terminal
|
2022 Jul 27 08:09 |
2221 |
Mutt’s secret sauce (2017) | Hacker News |
https://news.ycombinator.com/item?id=32191626 |
terminal
|
2022 Jul 23 17:52 |
2219 |
create tmux startup sh and make alias instead of using tmux-resurrect |
|
terminal
|
2022 Jul 23 07:34 |
2167 |
Show HN: tere – A Faster Alternative to cd+ls | Hacker News |
https://news.ycombinator.com/item?id=32106126 |
terminal
|
2022 Jul 17 19:39 |
2044 |
Show HN: I built an interactive course that helps you learn Vim faster | Hacker News |
https://news.ycombinator.com/item?id=32034625 |
terminal
|
2022 Jul 09 13:16 |
1981 |
Tmux Clear History - Today I Learned
`tmux clear-history` is the CLI version of the Tmux meta command `:tmux clear-history`.
|
https://til.hashrocket.com/posts/gsenc0au3s-tmux-clear-history |
terminal
|
2022 Jun 20 06:50 |
1919 |
Make Linux Fast Again (2019) | Hacker News |
https://news.ycombinator.com/item?id=22830330 |
terminal
|
2022 Jun 15 09:44 |
1918 |
Make Linux Fast Again | Hacker News |
https://news.ycombinator.com/item?id=31745636 |
terminal
|
2022 Jun 15 09:43 |
1844 |
The Comprehensive List of Window Managers for Unix | Hacker News |
https://news.ycombinator.com/item?id=31665749 |
terminal
|
2022 Jun 11 10:47 |
1693 |
GNU Parallel Tutorial — GNU Parallel 20220522 documentation |
https://www.gnu.org/software/parallel/parallel_tutorial.html |
terminal
|
2022 May 25 07:18 |
1688 |
bat — продвинутая замена cat или о том, как Rust набирает обороты - YouTube |
https://www.youtube.com/watch?v=3w3NndD6BKI |
terminal
|
2022 May 24 08:42 |
228 |
When does a UNIX directory change its timestamp - Stack Overflow |
https://stackoverflow.com/questions/3451863/when-does-a-unix-directory-change-its-timestamp |
terminal
|
2022 May 18 18:42 |
198 |
symlink crontab at DuckDuckGo |
https://duckduckgo.com/?q=symlink+crontab&ia=web |
terminal
|
2022 May 18 17:08 |
72 |
TestDisk - CGSecurity |
https://www.cgsecurity.org/wiki/TestDisk |
terminal
tools
|
2022 May 11 09:31 |
71 |
keyboard - How do I remap the Caps Lock and Ctrl keys? - Ask Ubuntu |
https://askubuntu.com/questions/33774/how-do-i-remap-the-caps-lock-and-ctrl-keys/521734 |
terminal
|
2022 May 10 16:52 |
65 |
Modern makefiles used the right way in 2020 - DEV Community |
https://dev.to/brickpop/modern-makefiles-used-the-right-way-in-2020-25mg |
terminal
|
2022 May 09 18:25 |