bash – refer the first parameter from last command quickly
To refer to first parameter from the last command quickly, you can use
!^
Note: This can also be referred as “!!:1“
To refer to first parameter from the last command quickly, you can use
!^
Note: This can also be referred as “!!:1“
In bash you can use
!#
to refer to any parameter from the current command, example:
mv ak amit.!#:1.txt ls amit.ak.txt
From : http://www.thregr.org/~wavexx/software/dl/
“dl” is a file exchange service that allows you to upload any file to a web server and generate a unique ticket for others to download. The ticket is automatically expired according to the specified rules, so that you don’t need to keep track or cleanup afterward. “dl” also allows you to grant an anonymous, one-time upload for others to send you a file, without the requirement of account management.
Continue reading
I have to several times debug scripts that I get complain about working when logging in normally but they do not work when run in cron mode. So, quite a lot of times, redirecting the stderr of the script is all that is required to see what is happening, but sometimes that just does not help if the script is calling another script which is mis-behaving and under lot of other conditions. So, how to at-least take a look at why these are failing, login with ssh.
Continue readingFirst you will need the ldap search utility. The client for ldap search comes in openldap-clients, so you need to install that first:
sudo yum install openldap-clients
Now, that you have installed it, try to find something in some open ldap server, example:
ldapsearch -LLL -h db.debian.org -x -b "dc=debian,dc=org" "cn=Joao*"
This should list couple of entries for you. Now, that you have ldapsearch working, lets define a function in .bashrc file:
Continue readingApache provides a module to see the server-status. However the page is not too good looking. So, if you want to see a better looking information page, then you can download :
http://sourceforge.net/projects/pimpapachestat/
More details from the readme file of the project:
REQUIREMENTS
- On the system you want to install the pimped Apache status:
– any webserver with php 5 (with curl; no database is needed)- On all webservers you want to monitor:
– apache 2.x
– installed module mod_status and ExtendedStatus On
– permission for the monitoring server to request the the
alias /server-status (see below)
And tehn for installation:
Continue readingFrom CACert website :
CAcert.org is a community-driven Certificate Authority that issues certificates to the public at large for free.
CAcert’s goal is to promote awareness and education on computer security through the use of encryption, specifically by providing cryptographic certificates. These certificates can be used to digitally sign and encrypt email, authenticate and authorize users connecting to websites and secure data transmission over the internet. Any application that supports the Secure Socket Layer Protocol (SSL or TLS) can make use of certificates signed by CAcert, as can any application that uses X.509 certificates, e.g. for encryption or code signing and document signatures.
Continue reading