Episode LB-005×2 show notes

Art and chattr meandered for about ten minutes at the start of the show, going over some stuff that’s happened since the last episode, LB-003×2.  We mentioned the following and other stuff.

  • Ohio Linux Fest 2012 audio files are now available on the Internet Archive,  go to archive.org and search for Ohio Linux Fest 2012 and you should get a page with some 45 links.  Thanks to Ahuka for the editing and posting.
  • Southeast Linux Fest 2012 session recording are being released on youtube
  • The Hackers On Planet Earth site is another source for plenty of good media content for your enjoyment.  radio.hope.net/archive.html has the content.

Our main topic was backups, and to start, we had a discussion of ‘backing up to what?’ usb stick? usb spinning drive? somethign else?  Each target medium has advantages and disadvantages, such as convenience, location (off site, on site, portable, etc.)

chattr mentioned that he uses the ‘ tar ‘ command and since he backs up the same stuff each time, the particular invocations of tar he uses are available in the bash shell’s history.  (tar gets run from the bash shell command line.)  That lead into a discussion of bash history, searching the history, retrieving the history: the ‘ history ‘ command, piping the history command’s output to a pager such as less, redirecting the history command’s output to a text file and searching with an editor, history getting written to the dotfile .bash_history in a user’s home directory, and using <ctrl>-r to reverse-history-search through bash history.

Making a list of installed packages: chattr’s system runs debian wheezy, so he’s familiar with how to do that in debian, using dpkg or aptitude.  Art runs an Arch-based system, so he gave us ‘ pacman -Q ‘ to output a list of installed packages on his machine.  Some of the ways to do this in debian are:

  • as root ‘ dpkg –get-selections | awk ‘$2==”install” {print $1}’ > list.of.packages ‘. See dpkg’s manual page for what the –get-selections option does.  The awk bit will filter the output so that the first field ($1), iow the package name,  will be printed if and only if the second field ($2) is ‘install’.  Output is then redirected with > to a plain text file with the name list.of.packages.
  • as root ‘ aptitude ~i -F %p > another.list.of.packages ‘  See the helpful aptitude manual supplied by the debian package aptitude-doc-en (or whatever language you’re comfortable with).  Install that package and point your browser to /usr/share/doc/aptitude/en/html/ch02s04s05.html for an explanation of ~i (installed packages) -F (apcify a particular format to put on the output) and %p (format is: package name).  The output is again redirected to a plain text file, this time named another.list.of.packages.

Here’s a tip when you name those plain text files: put the creation date in the file name to make it easier to identify a particular file of scan a number of file names. chattr uses bash command substitution to automatically include the date in the name, by doing the following:

  • rather than redirecting the output to another.list.of.packages, redirect the output to, say, another.list.of.packages.$(date -I) which will append the date in yyyy-mm-dd format to the end of the file name.  The -I is a capital letter eye, not the numeral one.

That’s using the system to do the work for you, cutting down on your typing.  In addition, if you’ve run a tar command and redirected the output to, let’s say, some.backup.$(date -I) then the next time you call that command from your bash history the $(date -I) will expand to the new date, not to the date you last ran that instance of tar.  Using the $(date -I) bit in the file name will work whether you’re creating the file with pacman, dpkg, aptitude, or really any time you’re creating a new file, text or not.

Art pointed out that one > symbol will create a new file with the name you specify.  If there’s already a file with that name, then the old file is overwritten and you will lose the contents of the old file.  You can use two > symbols ( >> ) to append what’s new to what was already in the old file.  You won’t overwrite with >>.

Once you have a list of installed packages, if you have to do a reinstall, you have a list of the packages on the old system.  Reinstalling those packages will get you some basic, system wide configuration files, but if you’ve changed any system wide configurations or made personal configuration tweak, using the package list will not restore those customizations.

That got us to the next question ‘what do I back up?’  First thing we covered was what’s in your /etc directory. An image illustrating some basic file system directory hierarchy information is at http://blog.mypapit.net/upload/files/linux_file_structure.jpg

chattr uses this command to back up his /etc:

  • as root, ‘ tar jvcpf /media/sdj1/etc.$(date -I).tar.bz2 /etc ‘ where /media/sdj1 is where his usb stick is mounted.

Art got us out of that rathole and back to a discussion of where to keep your backups.  The pogoplug is a useful device for that, since it can sit on your local network, or anywhere you can access the device over the internet.  It works ‘out of the box’, getting an ip address from your router.  Some other possibilities besides the pogoplug are dprobox, box.com, carbonite, a NAS machine, using a drive dock, cabling a portable drive or places for, say, photos like flickr.

And that pretty much wrapped up the show.  Please send comments  to linuxbasix@gmail.com or post in the forums or visit the #linuxbasix irc channel on irc.freenode.net


Episode LB-004×2 – MARS has a what?! Pictures don’t lie


So there are a few things we are changing. The naming convention of the show is reverting back, we’ve just released episode 127. Jonathan came on the show and bailed my butt out for not being prepared. HonkeyMagoo gives us the rundown on Damn Small Linux and Bill showed up for support. Below are some of the topics we touched on. More to come later this week.


1. What we have been up to
2. Any new linux or tech projects
3. What is new with LinuxBasix

Python Study Group:
1.What it is
2.When we are going to meet
3.where to go to sign up for the codeacademy.com

1.Security in Linux
2. What we use
3. What we might not use
4. What we should use and why
5. Is there a line between being secure and tin foil hat? (this has always been a question of mine that i dont have an answer for)

1.What is it
2.Where it can be found (home router, home server, firewall distros)
3.Commonly used ports

1.What is it
2.Example of how to use it to scan a Windows box using a live Linux distro

1.The final look
2.Put a fork in it it’s done