tag: UNIX

Program of the week xwininfo - window information utility for X

17 Jun, 2012 - 1 minutes
Run it via the command line and click on a window you’d like more information about, and view the output. For more inforamtion see ‘man xwininfo’ Example output: osaka@OsakaPad ~ $ xwininfo xwininfo: Please select the window about which you would like information by clicking the mouse in that window. xwininfo: Window id: 0x201484c "Terminal" Absolute upper-left X: 684 Absolute upper-left Y: 54 Relative upper-left X: 1 Relative upper-left Y: 29 Width: 682 Height: 688 Depth: 32 Visual: 0x63 Visual Class: TrueColor Border width: 0 Class: InputOutput Colormap: 0x2000005 (not installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +684+54 -0+54 -0-26 +684-26 -geometry 75x38-0+25

rm exclude

21 Jan, 2011 - 1 minutes
With help from Google and Linux forum, found a cool command that will delete everything else but not the folder or file name in the specified field behold the command of destiny! rm -r `ls | grep -v 'snapshots'` Make sure that around the piped ls command you have tilda and a single quote around the file/folder name. Chomputers away!

Generate 1000 random words using UNIX

8 Oct, 2010 - 2 minutes
I need 1000 random words in non-alphabetical order, don’t ask why… I just do. So after looking though the ‘bin’ folder for a program that might generate these words and found nothing, I decided to head to the internet. This is where I found out about the ‘words’ file which is located in ‘/usr/dict/words’ this file is used for things like spell checking. Now this contains many many words. This is what I was looking for!