Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. zcat /var/log/apt/history.log.*.gz | cat - /var/log/apt/history.log | grep -Po '^Commandline: apt-get install (?!.*--reinstall)K.*'
  2.  
  3. grep " install " /var/log/dpkg.log
  4.  
  5. sudo apt-get install [package]
  6.  
  7. history | grep "apt-get install"
  8.  
  9. grep "apt-get install" .bash_history
  10.  
  11. ravan@ravan:~$ grep "apt-get install" .bash_history
  12.  
  13. sudo apt-get install --no-install-recommends ubuntu-mate-core ubuntu-mate-desktop
  14. sudo apt-get install xfce4
  15. sudo apt-get install xfce4.12
  16. sudo apt-get install pgadmin
  17. sudo apt-get install touchegg
  18. sudo apt-get install aptitude
  19. sudo apt-get install aptitude
  20. sudo gedit .bash_history | grep "apt-get install"
  21. sudo apt-get installvim
  22. grep "apt-get install" .bash_history
  23. cat .bash_history | grep "apt-get install"
  24.  
  25. history | grep apt-get
  26.  
  27. zcat /var/log/apt/history.log.*.gz | cat - /var/log/apt/history.log | grep -Po '^Commandline: apt-get install (?!.*--reinstall)K.*'
  28.  
  29. zcat -qf /var/log/apt/history.log* | grep -Po '^Commandline: apt-get install (?!.*--reinstall)K.*'
  30.  
  31. -q --quiet
  32. Suppress all warnings.
  33. -f --force
  34. Force compression or decompression even if the file has multiple links or the corre‐
  35. sponding file already exists, or if the compressed data is read from or written to a
  36. terminal. If the input data is not in a format recognized by gzip, and if the option
  37. --stdout is also given, copy the input data without change to the standard output: let
  38. zcat behave as cat. If -f is not given, and when not running in the background, gzip
  39. prompts to verify whether an existing file should be overwritten.
  40.  
  41. alias apted='zcat /var/log/apt/history.log.*.gz | cat - /var/log/apt/history.log | fgrep Commandline: | cut -d " " -f 2- | grep -P "^|install"'
  42.  
  43. #!/bin/sh
  44. NumDaysAgo=18
  45. find /var/lib/dpkg/info -name "*.list" -mtime -$NumDaysAgo
  46. -exec stat -c $'%yt%n' {} ; |
  47. sed -e 's,/var/lib/dpkg/info/,,' -e 's,.list,,' |
  48. sort -r |
  49. while read Date Time Xxx Pkg
  50. do
  51. lncnt=$(apt-cache --installed rdepends $Pkg | wc -l)
  52. if [ $lncnt -eq "2" ]
  53. then echo "$Date $Time $Pkg"
  54. fi
  55. done
  56. echo "JOB COMPLETED: $BASH_SOURCE"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement