jump to navigation

Backup using cpio command in linux: 06.03.06

Posted by wimac in *nix.
add a comment

Backing Up and Restoring Using the cpio Command The cpio command is one of the most commonly used Linux back up tools. The cpio command has two unusual features Unlike tar , in which the files to back up are typed in as part of the command, cpio reads the files to work with from the standard input (in other words, the screen). This feature means that cpio must be used as part of a multiple command or with a redirection pipe. Examples of this usage are shown in the tables below. cpio must always be used with one of three flags. Flags are options that set the mode in which the command runs. Only one flag can be used at a time, and it must come before any other options. In addition, the choice of flags limits the options that can be used. Each flag also has a gnu option that can used in its place. The gnu option gives a convenient name for each flag: extract, create, and pass- through. If you want to know more options and how to use check cpio man page Backing Up using the cpio Command To do a backup, use cpio with a search command, such as find . The basic structure is: find -name string -print | cpio -o options > directory . In this example: The -name option for find lets you search for a string enclosed in double quotation marks. Metacharacters can be used. The bar character ( | ) redirects the output of find to cpio . The -o flag sets cpio to create an archive file for backing up. The target is a directory. The > redirection operator redirects files to the location for the back up. Typically, this location is on a removable device. CPIO Command Examples

Examples What it does

1) cd /u/test

2) find . -print | cpio -ocv > /dev/fd0

Reads file names using the find command and copies to the floppy drive (/dev/fd0).

find . -cpio /dev/fd0 -print

Saves files in current directory and writes this info to floppy. Same command as above except much faster.

1) cd /u/test 2) cpio -icuvd < /dev/fd0

Restore files and directories saved on the floppy device. These files are restored under the current directory (/u/test) Only if relative pathnames (./) were used.

cpio -itvcC1 < /dev/rmt0

List the table of contents from a tape device.

1) cd /u/test

2) find . -print | cpio -dumpv /u/jerry

Copies all files FROM one directory TO another WITHOUT changing the permissions, owner/group or modification date of the file.

Use the following command to verify that all files were copied:

find /u/test -print | wcfind /u/test1 -print | wc

If the number of files encountered is the same for both directories its safe to assume that the directories are identical.

NOTE: that the number of blocks allocated to the SOURCE directory (/u/test) may be larger than the DESTINATION directory (/u/test1), since compaction of the directory structure will have occurred at the destination end.

cpio -imv /home/test/.profile < /dev/fd0

Selectively restore the /home/test/.profile file from floppy cpio -i "*.f" "*.c"

Advertisements

Boot out Microsoft, boot up Linux: 05.12.06

Posted by wimac in *nix.
add a comment

For many, Microsoft Windows seems like the only game in town. Linux is viewed as too difficult for the average consumer — a perception the Linux community challenges head-on with user-friendly distributions, commitment-free liveCDs, how-to-books, and articles like a recent four-part offering from ExtremeTech. In part one of “Giving Microsoft the Boot,” author Dave Salvatore explains what the home user will gain and lose by switching away from Microsoft products, and covers the basics of exploratory installation. In part two, Salvatore covers set-up of a secure and low-cost home server. Part three addresses readers who insist on bleeding-edge gear for the latest computer game releases, showing them how to configure dual-boot Windows/Linux machine. In the fourth and final installment, Salvator explains what it takes to get a Linux based home theater PC system working… aside from patience and plenty of time.

Read parts one, two, three, and four of “Giving Microsoft the boot” at ExtremeTech.com

Mounting NTFS using ntfsmount: 05.06.06

Posted by wimac in *nix.
add a comment

Descriptive page that tells us how to mount a Windows NTFS particle RW under Linux. “ntfsmount (part of the ntfsprogs) is a FUSE file system driver that allows you to mount NTFS volumes. It is different from the kernel driver in the way that is resides in the user space. That means that it is a bit slower but has more features, and we love features, don’t we? ”

ntfsmount [wiki.linux-ntfs.org]

Five-Minutes to a More Secure SSH 04.22.06

Posted by wimac in *nix.
add a comment

Here is a quick way to drastically improve the security of your OpenSSH server installations. Apart from past flaws in the OpenSSH daemon itself that have allowed remote compromise (very rare), most break-ins result from successful brute-force attacks. You can see them in your firewall, system or auth logs, they are an extremely common form of attack. Here is an excerpt from the /var/log/messages file on a CentOS Linux box (the attacking hostname has been obfuscated). You can see multiple attempts to login as users root and ftp. Also note the time between repeated attempts – one second or less, much too quick to be a human. This is an automated attack.

:

HOWTO Encourage Women in Linux 04.21.06

Posted by wimac in *nix.
add a comment

“My girlfriend hates Windows, how can I encourage her to use Linux?””

“Almost no women attend my local LUG. How can I fix this?”

“Why aren’t there more women in open source?”

Clearly, people in the Linux community would like for more women to be involved in Linux, but most people don’t know why so few women are involved or how to change that. This HOWTO is an effort to summarize the explanations, recommendations, and opinions of the women who already are interested and active in Linux. This document began with the verbatim recommendations of the women who attended the LinuxChix BOF, and was added to by many more women in the months following the original BOF. In other words, this HOWTO represents the feelings and opinions of real women involved in Linux. While we represent the women who “made it,” we still have fairly important insights into why other women left or never entered the Linux community, as well as being keenly aware of the pressures which are currently pushing us out of the community.

In this HOWTO, we’ll talk about why women stay out of computing in general, why they stay away from Linux in particular, and what you can do to help encourage women in Linux. We hope that this HOWTO will result in more women using, installing, and developing Linux.

read more

Going wireless with Linux 04.05.06

Posted by wimac in *nix.
add a comment

The Linux wireless LAN support site offers a searchable directory of wireless devices with information regarding their level of support in Linux. Since I’m a big proponent of repurposing old laptops the Linux way, this is a really handy resource, especially since wireless support in Linux can be a tricky thing. You can save a lot of time going into a Linux install if you already know whether or not your wireless device is supported and how to get it up and running.

read more

nUbuntu – Flight 5 is Cleared for Landing 03.27.06

Posted by wimac in *nix.
add a comment

The next verson of nUbuntu is going to be released in 1 or 2 weeks.
“…This release will feature a polished Fluxbox interface with an awesome toolset. If you would like to suggest any packages please drop by to our IRC channel on irc.kaffeinenet.com #nubuntu…”

This is a slimmed down version set up for networking and security applications it runs Fluxbox instead of Gnome might be worth checking out.

read more | digg story

Roll Your Own Firewall 03.27.06

Posted by wimac in *nix.
add a comment

A comprehensive user friendly guide to setting up your own firewall on GNU/Linux.

read more | digg story

Oklahoma city threatens to call FBI over ‘renegade’ Linux maker 03.25.06

Posted by wimac in *nix, computing.
add a comment

Oklahoma city threatens to call FBI over ‘renegade’ Linux maker Our mistake is YOUR problem By Ashlee Vance in Mountain View Published Friday 24th March 2006 20:20 GMT The heartland turned vicious this week when an Oklahoma town threatened to call in the FBI because its web site was hacked by Linux maker Cent OS. Problem is CentOS didn’t hack Tuttle’s web site at all. The city’s hosting provider had simply botched a web server. This tale kicked off yesterday when Tuttle’s city manager Jerry Taylor fired off an angry message to the CentOS staff. Taylor had popped onto the city’s web site and found the standard Apache server configuration boilerplate that appears with a new web server installation. Taylor seemed to confuse this with a potential hack attack on the bustling town’s IT infrastructure.

read more:

Few Linux, FOSS alternatives at tax time: 03.24.06

Posted by wimac in *nix.
add a comment

Linux users and open source fans have few options when it comes to computerized filing of their federal and state income taxes in the United States. Many electronic filers have security and data-loss concerns about filing with the Internal Revenue Service (IRS) or through tax service vendors. One open source alternative for filers in a few states is Open Tax Solver (OTS), and another possible future option is just emerging. These recent projects leave little choice for FOSS users, but at least make filing with open source software or a Linux machine possible.

read more