$dpkg-lDesired=Unknown/Install/Remove/Purge/Hold| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)||/ Name Version Description+++-==============-==============-============================================ii adduser 3.112ubuntu1 add and remove users and groupsrc apache2.2-comm 2.2.14-5ubuntu Apache HTTP Server common filesii apparmor 2.5.1-0ubuntu0 User-space parser utility for AppArmorii apparmor-utils 2.5.1-0ubuntu0 Utilities for controlling AppArmor...$aptitudesearch"~i"i adduser - add and remove users and groupsc apache2.2-comm - Apache HTTP Server common filesi apparmor - User-space parser utility for AppArmori apparmor-utils - Utilities for controlling AppArmor...
ここで、インストール済のパッケージリストの先頭に文字列が表示されているのがわかると思います。
...
rc apache2.2-comm ...
や、 c apache2.2-comm ...
...
$sudodpkg--purgemysql-server-5.1(Reading database ... 46165 files and directories currently installed.)Removing mysql-common ...Purging configuration files for mysql-common ...dpkg: warning: while removing mysql-common, directory '/etc/mysql' not empty so not removed.
$dpkg--list|grep"^rc" |cut-d" "-f3|xargssudodpkg--purge(Reading database ... 46163 files and directories currently installed.)Removing apache2.2-common ...Purging configuration files for apache2.2-common ...dpkg: warning: while removing apache2.2-common, directory '/var/www' not empty so not removed....$dpkg--list|grep'^rc'$
$echo"a b c d e"|cut -d "" -f 1a$echo"a b c d e"|cut -d "" -f 3c$echo"a b c d e"|cut -d "" -f 2b$echo"a b c d e"|cut -d "" -f 4d$echo"a b c d e"|cut -d "" -f 5e
2013年2月25日, 1:18 AM
[…] […]