» tagged pages
» logout

(Feed found, click Add Page to syndicate.) Error finding feed, please try again » Find feed title

A Blog Page allows you to add entries, for news or other time sensitive postings

(Login required to save to your tagged pages.)
(or Cancel)

Make further edits, (or Cancel)

(Login required to save to your tagged pages.)
(or Cancel)

(Editing anonymously: to be credited for your changes, login or register a new account)

Change Page Permissions? Changing these permissions will adjust who can modify this page.

Anonymous (change)
(change)
(or Cancel)
Upload an image from your computer:
or Copy an image from a URL:
or Erase the current icon:
Icon Preview:

or Cancel

Erase commands? The contents of commands page and all pages directly attached to commands will be erased.

or Cancel

(Editing anonymously: to be credited for your changes, login or register a new account)

other page actions:
commands

commands

Tags Applied to commands

No one has tagged this page.

commands Wiki Pages

What is commands? Edit this page and describe it here.

sorted by: recent | see : popular
Content Tagged commands

NSIS

manual de nsis para hacer instalador

NSIS: del.icio.us tag/nsis

git-remote-branch [Carl Mercier's blog]

git-remote-branch <create|delete>

git: del.icio.us tag/git

FTP Using a One-Liner and Perl Script

A colleague of mine, Mahlon Anderson, wanted to revisit the FTP Using a Shell Script post.

Here is what he had to say...

Here is a creative way to put an FTP command on a single line. Why one line? The short story is I needed to do an ftp in a crontab without calling another script.

Three things to note:

1) I have only tested this with Solaris 8.
2) This works in the one true shell, Bourne shell.
3) If you have a "$" in your password, it might cause you problems.



Use this in a Perl script. (I didn’t have access to the CPAN FTP module)

# vi myftp.pl

#!/usr/bin/perl

$USER = “esoft”;
$PASSWORD=”myftp125”;
$REMOTE=”esoft”;
$DIR=”/jpg_dir;
$FILE=”esoft.jpg”;
$echo = ‘echo “quote user ‘ . $USER. ‘\nquote pass ‘ . $PASSWORD .’\nbin\nlcd ‘ . $DIR . ‘\nmput $FILE\n”’;
@status = ‘$echo| ftp –nv $REMOTE‘;
print @status;
:wq!

The FTP module is for doing FTP directly with Perl...basically system calls to the C library directly. With the right modules, you can do all that from Perl without having to resort to the back quotes.

Run via CLI

# ./myftp.pl

Unix: My SysAd Blog

Show HTML Tags Within a Blogger Post

Previously, I was having issues displaying HTML tags within a Blogger post. To get around that pesky issue, I used an underscore, e.g. ,, , etc, or generated a jpg image of the example to demonstrate the use of a particular tag. But this action made it inconvenient to simply cut and paste without the arduous task of retyping or modification. Now I am using the textarea tag and it seems to be working fine with the Blogger platform.

Note: If you get the following error message when publishing/saving: "Your HTML cannot be accepted: Tag is not allowed: ", check the box to ignore.

Here is an example run that is followed by the parameters used for the textarea.




Unix: My SysAd Blog

An Enhanced and More Powerful Syslog App - syslog-ng

We recently purchased a new network application/appliance.

As part of my normal practice, I wanted to configure the
appliance to duplicate its logs to our centralized syslog server.
With standard syslogd, you add one line to your configuration
file (syslog.conf) and restart the daemon.

But this appliance uses syslog-ng, an enhanced and more
powerful syslog application.

The syslog-ng configuration file (syslog-ng.conf) includes
four main components: source, filter, destination, and log.

1. source (required) - This tells syslog-ng the source of
the log data. This could be a network port, streams,
a file (/proc/kmsg).

2. filter (optional) - If you want to throw all your log
data into one file, you don't need a filter.

3. destination (required) - Syslog-ng needs to know what
to do with the data it reads from "source". Destination
can be a file, a remote server IP, a pipe, usertty, etc.

4. log (required) - This is the line that makes it all
happen by bringing the above items together.

This line basically says:
"look at all the logs coming from $source, pull
this $filter and save it in $destination."

NOTE: You can include multiple source, filter and
destination on this line.

For example:
I want to configure syslog-ng to send all logs to a
local file and to my Centralized Log Server (IP 1.2.3.4)

-----------------
# Solaris Configuration:

# SOURCE
# This source entry allows locally generated logs to be captured

source local { sun-streams("/dev/log" door("/etc/.syslog_door")); internal(); };

# FILTER (optional)
# I'm not defining any filter since I want everything.

# DESTINATION
# I want to send the logs via standard syslog udp port to IP# 1.2.3.4)
# and to a file locally, /var/log/everything.log.

destination logserver { udp("1.2.3.4"); };
destination localfile { file("/var/log/everything.log"); };

# LOG

log { source(local); destination(logserver); destination(localfile); };

---------------

After you edit your configuration file, you can verify the syntax using this command:

$ syslog-ng -s

If you don't have any errors, restart your syslog-ng daemon.
You should now be logging everything to the file /var/log/everything.log as well as to the remote log server.

Post provided by Mary M. Chaddock

Unix: My SysAd Blog

Page 1 | Next >>
Username:
Password:
(or Cancel)