更新 alias.txt
This commit is contained in:
17
alias.txt
17
alias.txt
@@ -283,7 +283,6 @@ function 7zx() {
|
|||||||
local direct_pattern='\.(zip|7z|rar)$'
|
local direct_pattern='\.(zip|7z|rar)$'
|
||||||
|
|
||||||
if [[ "$lower_name" =~ $tar_pattern ]]; then
|
if [[ "$lower_name" =~ $tar_pattern ]]; then
|
||||||
# 先解压外层(xz/gz/bz2/zst),再解tar
|
|
||||||
7z x -so "$archive" | 7z x -si -ttar -o"$outdir"
|
7z x -so "$archive" | 7z x -si -ttar -o"$outdir"
|
||||||
elif [[ "$lower_name" =~ $direct_pattern ]]; then
|
elif [[ "$lower_name" =~ $direct_pattern ]]; then
|
||||||
# 直接解压
|
# 直接解压
|
||||||
@@ -326,7 +325,6 @@ function 7zxd() {
|
|||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
echo "✅ 解压成功,删除源文件..."
|
echo "✅ 解压成功,删除源文件..."
|
||||||
|
|
||||||
# 删除所有相关分卷,如 .part1.rar .part2.rar 等或 .001/.002
|
|
||||||
local prefix="${file%%.*}"
|
local prefix="${file%%.*}"
|
||||||
find . -maxdepth 1 -type f -regex "./$prefix\\..*" -delete
|
find . -maxdepth 1 -type f -regex "./$prefix\\..*" -delete
|
||||||
else
|
else
|
||||||
@@ -404,21 +402,6 @@ alias psr='systemctl restart php8.2-fpm && systemctl status php8.2-fpm'
|
|||||||
# . ~/.alias.md
|
# . ~/.alias.md
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
# 保存后运行 source ~/.bashrc
|
|
||||||
|
|
||||||
|
|
||||||
bk() {
|
|
||||||
# 检查tmux是否在运行状态,如果不是,则启动tmux
|
|
||||||
if ! tmux ls >/dev/null 2>&1; then
|
|
||||||
tmux new-session -d -s benchmark 'tmux rename-window "Benchmark"; /www/bk/webBenchmark_linux_x64 -c 32 -s '$1''
|
|
||||||
else
|
|
||||||
# 如果tmux已经运行,创建一个新窗口来运行命令
|
|
||||||
tmux new-window -n "Benchmark" '/www/bk/webBenchmark_linux_x64 -c 32 -s '$1''
|
|
||||||
fi
|
|
||||||
# 可选:如果你希望自动连接到tmux会话,取消下面的注释
|
|
||||||
tmux attach-session -d
|
|
||||||
}
|
|
||||||
|
|
||||||
alias pyv='pyenv virtualenv'
|
alias pyv='pyenv virtualenv'
|
||||||
alias pya='pyenv activate'
|
alias pya='pyenv activate'
|
||||||
alias pyd='pyenv deactivate'
|
alias pyd='pyenv deactivate'
|
||||||
|
|||||||
Reference in New Issue
Block a user