Linux

Linux

SSH and SCP: Howto, tips & tricks

A basic tutorial about the Linux commands ssh and scp. It features explanation about the syntax, the possibilities and the differences between the two. It…

1 min read
Linux

ShellSQL - SQL for shell scripts

| ShellSQL - SQL for shell scripts | ShellSQL is a suite of programs designed to enable LINUX/UNIX shell scripts to connect to SQL engines and execute SQL queries and commands in a simple way enabling intergration with the rest of the script. For example, it can do things like..

#/bin/shHANDLE=`shpostgres dbname=mydb`

shsql $HANDLE "begin"

for ARG in $

do

shsql $HANDLE "insert into mytable fld1, fld2" \

"values nextvalmyseq, $ARG"

done

shsql $HANDLE "commit"

if [ $# -gt 0 ]

then

ROWS=`shsql $HANDLE "select count from mytable"`

echo "No of rows now in table is" $ROWS

fi

shsqlend $HANDLE

For details on how it hangs together have a look at the overview.

1 min read
Linux

The Mad Philosopher » ssh keep-alive tip

Whenever I login remotely to my machine in Canada, the ssh session dies after a while if I don’t actively type something. This is not the server timing…

1 min read
Linux

How to Change the Timezone in Linux - wikiHow

| How to Change the Timezone in Linux - wikiHow | Most modern Linux distributions have user-friendly programs to set the timezone, often accesible through the program menus or right-clicking the clock in a desktop environment such as KDE or GNOME. Failing that it's possible to manually change the system timezone in Linux in a few short steps.

| 1. Logged in as root, check which timezone your machine is currently using by executing date. You'll see something like Mon 17 Jan 2005 12:15:08 PM PST, PST in this case is the current timezone. | 2. Change to the directory /usr/share/zoneinfo here you will find a list of time zone regions. Choose the most appropriate region, if you live in Canada or the US this directory is the "America" directory. | 3. If you wish, backup the previous timezone configuration by copying it to a different location. Such as

1 min read
Linux

How to unzip very large files

Some windows programs use a compression for larger files that is not compatible with the linux unzip command. Resulting in the following error:…

1 min read
Linux

O+P Insights: Linux HW RAID Howto

There is great software RAID support in Linux these days. I still prefer having RAID done by some HW component that operates independently of the OS. This…

2 min read
Linux

Using Rsync and SSH

A classic guide to setting up automated rsync backups over SSH with key-based authentication, originally from Troy Johnson’s tutorial.

2 min read
Linux

10 Linux Shell Tricks You Don't Already Know. Really, we swear.

| Here’s a bunch of damn useful commands you haven’t heard before. | 1. A Simple way to Send Output and Errors | 2. Parallelize Your Loops | 3. Catch Memory Leaks By Using Top via Cron | 4. Standard in directly from the command line | 5. Set a Random Initial Password, That Must be Changed | 6. Add Your Public Key to Remote Machines the Easy Way | 7. Extract an RPM without any additional software | 8. See How a File Has Changed from Factory Defaults | 9. Undo Your Network Screwups After You’ve Lost the Connection | 10. Check a Port is Open

1 min read
Linux

Linux HOWTO: NetMasks Explained

Every machine needs an individual address. To keep things simple, we assign them in clumps; each network of machines generally gets a range of addresses.

2 min read
Linux

LDAP Authentication In Linux

This howto will show you howto store your users in LDAP and authenticate some of the services against it. I will not show howto install particular…

1 min read
Linux

Sysadmin toolbox

This is mainly for Linux folk but Mac Admins should be able to find equivalent tools.

1 min read
Linux

Mac OS X - Hidden Files

Articles > Trash or Treasure" href="http://maczealots.com/articles/hiddenfiles/">MacZealots > Articles > Trash or Treasure

The idea of a hidden file has changed since the days of the classic Mac OS, where a file's "hidden" attribute was set in the resource fork of the file, and wasn't immediately accessible to the user. In OS X (and UNIX in general), it's much easier. All you have to do is preface the name of a file with a period ("."), and the file won't show up in the Finder, as well as Save/Open dialogs, etc. This can be a good way to hide a confidential file

1 min read