Check These Out
Runs an instance of screen with name of "name_me" and command of "echo "hi""
To reconnect to screen instance later use:
screen -r name_me
Fast and easy way to find all established tcp connections without using the netstat command.
This command will traverse all of the folders and subfolders under current working directory. For every file inside it, it will do a search inside the content of the file for a specific term 'what'. Then it will print a list of the lines that contain that term (and match that pattern). Each matching line will be preceded with the path and name to the file and then the line number iside taht file wehre the pattern was found. Then the actual content of the matching lien will be printed.
The output will be piped throug less, so that the user can scroll through it if it goes beyond the limits of the current display window.
doesn't require "at", change the "2h" to whatever you want... (deafult unit for sleep is seconds)
This would allow reference of $(VAR) (if defined) with the value 'foobar' within the Makefile.
Create a exact mirror of the local folder "/root/files", on remote server 'remote_server' using SSH command (listening on port 22)
(all files & folders on destination server/folder will be deleted)
This inserts timestamp instead of .bak extension.
While going through the source code for the well known ps command, I read about some interesting things.. Namely, that there are a bunch of different fields that ps can try and enumerate for you. These are fields I was not able to find in the man pages, documentation, only in the source.
Here is a longer function that goes through each of the formats recognized by the ps on your machine, executes it, and then prompts you whether you would like to add it or not. Adding it simply adds it to an array that is then printed when you ctrl-c or at the end of the function run. This lets you save your favorite ones and then see the command to put in your .bash_profile like mine at : http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html
Note that I had to do the exec method below in order to pause with read.
t ()
{
local r l a P f=/tmp/ps c='command ps wwo pid:6,user:8,vsize:8,comm:20' IFS=' ';
trap 'exec 66