What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-31 00:33:03
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
ps aux | grep -i dpkg // Kill processes which are running sudo kill -9 <pid> // Restart the accounts daemon sudo systemctl restart accounts-daemon Add solution -
Shell/Bash 2021-08-30 19:45:02
wget files matching regex
# Getting http://some/site/*my_pattern* SITE="http://some/site/" PATTERN="my_pattern" wget -nv -O- $SITE | grep $PATTERN | awk -v pat=$PATTERN -F '"' '{ for (i=1; i<=NF; ++i) { if ($i ~ pat) print $i } }' | while ... Add solution -
Shell/Bash 2021-08-30 17:49:03
git fetch all remote branch
# track all remote branches: git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done # update all local copies of remote branches git fetch --all # update all local tracking branc... Add solution