Posts tagged command

Linux Anti Virus for Websites

Windows 7 is the latest stable Windows operati...

Image via Wikipedia

Just because you run linux does not mean you completely forgo anti virus. Your website can be broadcasting Windows viruses or malware. Clamav, run from the command line, will scan your web directories recursively to identify various concerns. Install Clamav:

sudo apt-get install clamav

Then you can run Clam manually or you can install a cron job for it to be run automatically. Running Clam as root allows you to scan the higher level directories. The following command will scan the entire computer and remove viruses and malware:

sudo clamscan -r / --remove

Set this as a cronjob to run in the middle of the night; add it to the root crontab list:

0 2 * * * clamscan -r / --remove

Reblog this post [with Zemanta]

Grep Without a Pipe

Grep is used commonly to filter the printout of ls and ps commands. It will only print the search criteria that is the parameter of the grep command. For example:

ps aux | grep apache2

The previous command will determine if apache2 has a running process. You can also use the grep command without the pipe. This will search a folder, which you can do recursively with -r, and look for a particular string in the files. You can sift through the contents of the entire /etc directory for a particular string. How powerful!

sudo grep -r static /etc/*

The above command will most likely pull up /etc/network/interfaces, particularly if your network adapter is setup as static.

LTSP-Build-Client Arch option not in Help

To find the options for a command you type: command --help It spits out a bunch of options that you can use to tweak the parameters of a command. On the --help for the ltsp-build-client script is the --dist option, which I thought can be used to install a different distribution that the one you are current using on the host. For instance:

sudo lts-build-client --dist lenny

There is another option, and it is not specified in the --help. The --arch option allows the specification of different architecture than your host. For instance:

sudo ltsp-build-client --arch -i386

If you are using a 64 bit host, you can install an i386 client file system with this.

Sudo Apt-Get Update

The sudo command is a program that is not included in the Debian project, although it is a standard, and well integrated component of upstream distributions such as Ubuntu. The sudo command allows a user to access root functionality, without having to “su” or login to the root account directly. On Debian systems the /etc/sudoers file must be configured in order to authorized sudo functionality, whereas on Ubuntu distributions the sudoers file automatically accommodates system users.

The Apt-Get command is part of the aptitude application, and is designed for package management, and software updating. The application supports dependency resolution, and is analogous in functionality to the yum package management system.

Passing the update argument to the Apt-Get command results in a system update process. This process will contact the configured repositories and compare them to existing files on the local system. If an update is possible, the “sudo apt-get upgrade” command will process the respective program upgrade.

You can enter these commands directly into a terminal. For more information about the terminal, its location, and some examples visit:

http://www.bgevolution.com/blog/index.php/terminal-location-debianubuntu-a-beginners-tutorial/

All that the previous link will show is the terminal location. Click the applications menu, and in the accessories tab is the terminal. You can also hit alt-f2 to get a applications windows; enter “gnome-terminal” to open a terminal. If you want to change the entire terminal, and not open a terminal emulator press cntrl-alt f1. This will change your entire desktop terminal to a command prompt. Press cntrl-alt f7 to get back to your default shell and desktop.

Ubuntu Gutsy W32Codecs and W64Codecs

At medibuntu they offer a repository with two important codecs required to play most media and DVD files. The W32Codes is for 32 bit Linux systems, and the W64Codecs is for 64 bit systems. Libdvdcss2 is for DVD playback. Simply add the proper repository to your /etc/apt/sources.list file, also add the gpg key, hit a quick sudo apt-get update, and your ready to install your much sought after media codecs.

For Feisty run the following in a command window:

sudo wget http://www.medibuntu.org/sources.list.d/feisty.list -O /etc/apt/sources.list.d/medibuntu.list

For Gutsy Gibbon run in a command window:

sudo wget http://www.medibuntu.org/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/medibuntu.list

Then add the gpg key with the following command:

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update

 Note that this command will also update your apt system, then all you have to do is install the codecs:

sudo apt-get install w32codecs libdvdcss2 or: sudo apt-get install w64codecs libdvdcss2