
LINUX
Get flash to fully experience Pearltrees
When you have a java application server which generates a great deal of logs, it can be tricky to find the most important information, especially if you have detailed logging. Fortunately grep is capable of doing this very well. The following command will gather all WARN , ERROR , FATAL , and Exception stack traces . This command can be very useful for Java log monitoring scripts.
Copying Yesterday’s Exceptions with Stack Traces from Logs, Then Emailing To Administrators
If you’ve ever tried sending email via the command line, using the mail utility, you may find that the method can be unreliable in some cases. The email messages are often intercepted by spam bots, filtered by security programs, etc. A more elegant and stable alternative, is to use your existing email server to send the message.
Sending Mail in Shell Scripts via an External Server with Nail
Locate the most appropriate package for your distribution of Linux at the download site . Once you have located the RPM you will need do the following steps, substituting your chosen package for the RPM . [ root @ Internal ~ ] # wget http://packages.sw.be/rssh/rssh-2.3.2-1.1.el3.rf.x86_64.rpm --2010-10-11 20 : 36 : 21 -- http: // packages.sw.be / rssh / rssh-2.3.2- 1.1 .el3.rf.x86_64.rpm Resolving packages.sw.be... 85.13.226.40 Connecting to packages.sw.be | 85.13.226.40 | : 80 ... connected. HTTP request sent, awaiting response... 302 Found Location: http: // rpmforge.sw.be / redhat / el3 / en / x86_64 / rpmforge / RPMS / rssh-2.3.2- 1.1 .el3.rf.x86_64.rpm [ following ] --2010-10-11 20 : 36 : 21 -- http: // rpmforge.sw.be / redhat / el3 / en / x86_64 / rpmforge / RPMS / rssh-2.3.2- 1.1 .el3.rf.x86_64.rpm Resolving rpmforge.sw.be... 85.13.226.40 Reusing existing connection to packages.sw.be: 80 .
Restrict a Linux User’s Access: Only Allowing SCP/SFTP, no SSH
How To Execute a Script After a Running Process Completes
Most people who are familiar with Linux, realize that there are ways of chaining processes to run one after another. Typically this is done by writing a script, or using & & to daisy chain additional commands on command line. There is, however, another way to do this; if you’ve already issued a command and want to add another command after the original has already started. This is especially useful if you’re unzipping, say a 15 gigabyte database dump, and you want to make sure that the import happens immediately after the import is complete. Here’s an example of what would happen if I were entering the commands manually.What's so great about rsync? First, it's designed to speed up file transfer by copying the differences between two files rather than copying an entire file every time. For example, when I'm writing this article, I can make a copy via rsync now and then another copy later. The second (and third, fourth, fifth, etc.) time I copy the file, rsync copies the differences only . That takes far less time, which is especially important when you're doing something like copying a whole directory offsite for daily backup.
Back up like an expert with rsync | Linux.com
A: Mainly, because the question of how to restrict access to scp or sftp only kept coming up on a few different mailing lists I was on at the time... Several people made some suggestions (like using a shell script as the user's shell) which sort of work, but aren't terribly secure or reliable. The commercial SSH product has a program to do this, but OpenSSH does not. Joe Boyle has a similar program called scponly , which at the time I looked at it had some security problems, though they have since been fixed...
rssh - FAQ
Bash Script to Check MySQL Replication Status, Notification | Blog of Jason Grimme – Programming and All Things Jason
Posted on 07 April 2010 by Jason Grimme The first few days after setting up MySQL replication, I noticed that one small error would stop the replication. When this went production, we couldn’t afford to have the replication stop and not know about it. We can’t log into all our servers and check the status of things on a daily basis, we want to be notified about them. Luckily for me since I’m relatively new to bash, I found what somebody else had done and modified it a bit to suit our purposes. I then setup a cronjob for it to run every day and send us a notification email whether the status is good or bad.rsnapshot is a filesystem snapshot utility for making backups of local and remote systems. Using rsync and hard links, it is possible to keep multiple, full backups instantly available. The disk space required is just a little more than the space of one full backup, plus incrementals. Depending on your configuration, it is quite possible to set up in just a few minutes.
rsnapshot
MirrorManager
MirrorManager
H ow do I use bash for loop to repeat certain task under Linux / UNIX operating system? How do I set infinite loops using for statement? How do I use three-parameter for loop control expression? A 'for loop' is a bash programming language statement which allows code to be repeatedly executed. A for loop is classified as an iteration statement i.e. it is the repetition of a process within a bash script. For example, you can run UNIX command or task 5 times or read and process list of files using a for loop.
Bash For Loop Examples
Setting up a Fedora NFS server « myfedora
Setting up a Linux NFS (Network File System) server has never been anything challenging. However there are a few security issues worth having a look at: especiall the firewall-part of the business. In the following guide, we are going to have a look at a convenient way of creating an NFS server from behind Fedora’s built-in iptables firewall. The /etc/exports file is for storing information about your NFS shares: the name of the folder to share, the IP address(es) of hosts to access your share and the rights connected to your share.This HowTo explains how to set up the Network File System version 4 on your LAN for multiple shares. It explains, also, how to mount the exports on your client . The nfs-utils package provides what's need for both then client and the server. Usually, it comes preinstalled on an "out-of-the-box" installation of Fedora. However, to make sure it's installed run the following command.
User:Renich/HowTo/NFSv4 - FedoraProject
Regular Expressions
Now this is all well and good, but who wants to run their whole life from a single bash instance? If you use an X window system, you can type your passphrase once when you fire up X and all subprocesses will have your keys stored. Just press return when it asks you to assign it a passphrase- this will make a key with no passphrase required. If this works right you will get two files called whoisit and whoisit.pub in your .ssh dir. command="echo I\'m `/usr/ucb/whoami` on `/usr/bin/hostname`",no-port-forwarding,no-X11-forwarding,no-agent-forwarding ssh-dss AAAAB3NzaC1k[...]9qE9BTfw== whoisitnow That will do what we want on Solaris; to try this example on Linux use this:

