From fa3bf6ff377735d6066735eec5f99a9163558063 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 24 Mar 2023 21:52:36 -0400 Subject: [PATCH 1/2] point to directory --- .bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bashrc b/.bashrc index 803bce9..d4b9e85 100644 --- a/.bashrc +++ b/.bashrc @@ -134,4 +134,4 @@ source "$HOME/.bash-git-prompt/gitprompt.sh" fi #---------point to local--------------- -[ -f ~/.bashrc_local ] && source ~/.bashrc_local +[ -f ~/dot_config/.bashrc_local ] && source ~/dot_config/.bashrc_local From 33276ce8e9095da895a13ba7eae574890fb9486f Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 24 Mar 2023 22:28:59 -0400 Subject: [PATCH 2/2] add aliases to list open files and exec them --- .bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.bashrc b/.bashrc index d4b9e85..fb9c2df 100644 --- a/.bashrc +++ b/.bashrc @@ -92,6 +92,11 @@ alias ll='ls -alFh' alias la='ls -A' alias l='ls -CF' alias lb='lsblk -o+FSAVAIL,FSUSED,FSUSE%,MODEL,PARTTYPENAME,STATE' +alias opg="lsof 2>/dev/null +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'" +#alias opg="lsof +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r realpath" +alias osw="lsof 2>/dev/null +D . | awk '\$NF ~ /swp$/ {print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g'" +alias xpg="lsof 2>/dev/null +D . | grep 'pg.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f" +alias xsw="lsof 2>/dev/null +D . | grep '.*swp$' | awk '{print \$9}' | sed 's/\.swp//g' | sed 's/\/\./\//g' | xargs -r $PG -f" # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert