Top Nav

Archive | Misc

Here Doc

A “here document” is a method for specifying a multi-line string literal in many programming languages. Here are some examples:

Perl

PHP

Bash

0

Find group writable home directories

With procmail, vacation and forward files do not work if the user’s home directory is group writable. Here’s a script that will locate all group writable home directories:

0

Email alerts with Sophos virus scanner

I have looked through the Sophos configuration options and below is a list of commands that you can preform to get proper e-mail alerts:

To remove an email address from the list:

You can repeat the Email command above with a single email address and until you delete that new email using the delete command it will remain, so you can add multiple addresses at different times (the first time, add your address, then later add another technical addy.)

0

Disable on-access scanning with Sophos

To disable the on-access scanning in Sophos for now with this command:

It can later be re-enabled with this command:

As for checking for what Sophos has been doing lately, the log files are located in the following path:

As for further documentation, there are man pages for most of the various Sophos binaries that you can find in /opt/sophos-av/bin so you should be able to view the man page for them with “man savdctl” or whichever binary you need to look at.

1

Unzipping archives with large files

The standard unzip utility in RHFC6 was not able to handle the 2+GB zip files that I needed to uncompress.

Tried the solution shown here:

http://www.osde.info/HowToUnzipLargeFiles

which involves changing:

CF=”-O3 -Wall -I. -DASM_CRC $(LOC)”\

To:

CF=”-O3 -Wall -I. -DASM_CRC -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(LOC)”\

In the unix/Makefile

This helps as it lets unzip open the >2GB archive. But some of the files in the archive were larger then 4GB and gave and error like this:

need PK compat. v4.5 (can do v2.1)

Found a page here:

http://www.penlug.org/twiki/bin/view/Main/GigaUnzipping

with the solution which is to use p7zip from:

need PK compat. v4.5 (can do v2.1)

0