I wanted the ability to review the output from a shell script. I could always re-direct output to a log file, but then I don’t see where in the script I am currently at. I can always open a second terminal and then tail the lot file I used …
Argument list too long
Ever tried to copy or move a bunch of files on unix/linux from one location to another and see this error message spit out back at you??
$ cp /var/www/* /var/tmp
-bash: /bin/cp: Argument list too long
UNIX find to the rescue…
$ find /var/www -type f …SSH aliases
I constantly connect to linux or unix machines using ssh and it can get a little bothersome typing out the IP address repeatedly. Here is the typical syntax to connect to a linux box (random IP address)
ssh username@111.11.11.1
Now imagine typing this again and again …
Unix tar tricks
One of the most common programs on Linux systems for packaging files is the venerable tar. tar is short for tape archive, and originally, it would archive your files to a tape device. Now, you’re more likely to use a file to make your archive. To use a tarfile …
Sending email with a body and attachment from UNIX
It is easy to send a text file as the body of an email from UNIX. You can do it using the command below
mail -s "Email with file as body" email@domain.com < message.txt
Now if you want to send a file as an attachment, you would need …