Mint 6: 3 new commands

Three new commands made their way into Romeo last night: search, apt contains and apt content. All three of them are provided by mintSystem 5.5.

If you have Romeo set up as a repository simply type “apt update” and “apt install mintsystem”. Otherwise you can get the deb from here:

http://packages.linuxmint.com/pool/romeo/m/mintsystem/mintsystem_5.5_all.deb

apt content package

“apt content” shows the content of package, it’s a shortcut for “dpkg -L”. For instance, if you type “apt content mintsystem” you should see the following:

clem@mars ~/Desktop $ apt content mintsystem
/.
/usr
/usr/local
/usr/local/bin
/usr/local/bin/apt
/usr/lib
/usr/lib/linuxmint
/usr/lib/linuxmint/mintSystem
/usr/lib/linuxmint/mintSystem/icon.png
/usr/lib/linuxmint/mintSystem/python
/usr/lib/linuxmint/mintSystem/python/configobj.py
/usr/lib/linuxmint/mintSystem/templates
/usr/lib/linuxmint/mintSystem/templates/apt.conf
/usr/lib/linuxmint/mintSystem/templates/preferences
/usr/lib/linuxmint/mintSystem/GPL.txt
/usr/lib/linuxmint/mintSystem/version
/usr/lib/linuxmint/mintSystem/version/mintInstall
/usr/lib/linuxmint/mintSystem/version/mintInstall/portals.list
/usr/lib/linuxmint/mintSystem/version/mintInstall/release.id
/usr/lib/linuxmint/mintSystem/version/mintInstall/sources.list
/usr/share
/usr/share/doc
/usr/share/doc/mintsystem
/usr/share/doc/mintsystem/copyright
/usr/share/doc/mintsystem/changelog.gz

apt contains filename

“apt contains” tells you which package contains a particular file. It’s a shortcut for “dpkg -S”. For instance if you type “apt contains /usr/lib/linuxmint/mintSystem/GPL.txt” you should see the following:

clem@mars ~/Desktop $ apt contains /usr/lib/linuxmint/mintSystem/GPL.txt
mintsystem: /usr/lib/linuxmint/mintSystem/GPL.txt

search for keyword in directory

“search” lets you search for files containing a particular keyword. You can get a list of options by typing “search –help”:

clem@mars ~/Desktop $ search help

usage: search [arguments] [options]
arguments:
for text
in directory
options:
-c | –case-sensitive
-s | –show-filenames-only

“search” is easy to use. Let’s take an example and search for “workgroup” in /etc/samba. We type “search for workgroup in /etc/samba” and we see the following:

clem@mars ~/Desktop $ search for workgroup in /etc/samba
/etc/samba/smb.conf.ucf-old:26:# Change this to the workgroup/NT-domain name your Samba server will part of
/etc/samba/smb.conf.ucf-old:27:   workgroup = MSHOME
/etc/samba/smb.conf:26:# Change this to the workgroup/NT-domain name your Samba server will part of
/etc/samba/smb.conf:27:   workgroup = MSHOME

We can refine the search by adding “–case-sensitive” or only show filenames by adding “–show-filenames-only”. For instance:

clem@mars ~/Desktop $ search in /etc/samba for workgroup –case-sensitive –show-filenames-only
/etc/samba/smb.conf.ucf-old
/etc/samba/smb.conf

Let us know what you think and if you find any bugs. These will eventually be backported into Elyssa and will be featured as some of Mint 6’s improvements.