Иногда бывает ситуация когда dev-сервер по какой-либо причине не закрылся и висит в процессах, занимая порт.
Это может быть из-за падения IDE или просто сам забыл погасить и закрыл терминал.
Для таких случаев я набросал простую функцию с командой:
kill_on_port() {
port=$(lsof -t -i:$1)
echo "KILL PROCESS:" $port
sudo kill -9 $port
}
alias killonport="kill_on_port $@"
Код поместить в ~/.bashrc и рестартнуть систему.
Если во время старта dev-сервера получаете ошибку что порт уже занят, просто выполните команду, подставив свой порт.
Bash
kill_on_port 8000
Скорее всего бесполезно, если другой процесс назначен на перезапуск вашего dev-сервера в случае падения.
Имя команды можете изменить на любое другое.
#linux
Here are some links about #systemd#alternatives for #Linux in no particular order.
Which are your favorite alternatives and distros?
https://wiki.gentoo.org/wiki/Comparison_of_init_systems
https://suckless.org/sucks/systemd/
https://unixsheikh.com/articles/the-real-motivation-behind-systemd.html
https://sysdfree.wordpress.com/
https://nosystemd.org/
https://skarnet.org/software/systemd.html
https://the-world-after-systemd.ungleich.ch/
https://ewontfix.com/14/
https://forums.debian.net/viewtopic.php?t=120652
https://www.devuan.org/os/announce/
https://www.devuan.org/os/init-freedom
https://thehackernews.com/2019/01/linux-systemd-exploit.html
https://judecnelson.blogspot.com/2014/09/systemd-biggest-fallacies.html
https://chiefio.wordpress.com/2016/05/18/systemd-it-keeps-getting-worse/
https://systemd-free.artixlinux.org/why.php
Some more added here too: https://start.me/p/Kg8keE/priv-sec
#systemd#Linux
🔖 linuxmint/timeshift: System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. Supports scheduled snapshots, multiple backup levels, and exclude filters. Snapshots can be restored while system is running or fro #pinboard#linux#rsync#tool#backup
一直没想清楚,在同步过程中,文件被修改的情况,rsync 是如何处理的。
https://github.com/linuxmint/timeshift
SageRead:一款支持 AI 对话的电子书阅读器
你可以用它来读电子书,做笔记和高亮标注。不懂的地方直接问 AI,它会根据书籍内容给你解答。支持自定义 AI 提示词,可以让 AI 帮你总结、翻译或做其他事情。所有数据都存在本地,支持自己配置 AI 服务
🏷标签:#电子书#AI#windows#macOS#linux
☁链接:Github
⭐频道😮群聊✏投稿🌍中文
Channel: FOSS Post
Members: ~2.04K
💢 Username: @fosspost
Description:
FOSS Post is a high-quality online magazine about Linux and open source software. This channel posts daily news from all over the web too. Website: https://fosspost.org
🏷 Tags: #technology
#linux#open_source#foss#technology#free_software
https://telegramchannels.me/channels/fosspost