background preloader

Command line tricks for smart geeks

Command line tricks for smart geeks
Everyone knows the answer to the question of life, the universe and everything is "42", but for the first time we can reveal the question. It is this: how many command-line tricks must a man memorise? You see, graphical user interfaces are all well and good, but when you want to get real work done it's time to switch to the terminal. And so, we squeezed our brain cells, dug through dusty piles of old issues of Linux Format, and sat reflecting quietly over many a pint of ale, all with the goal of bringing you this: 42 awesome new command line tricks we think you ought to commit to memory. So, strap yourself in and get ready for command-line heaven: it's time to kick ass and chew bubble gum, and we're all out of gum... (PS: if you're looking for general Linux tips, check out our previous two articles: Linux tips every geek should know and More Linux tips every geek should know. Make your own Bash wormholes Before we look at how to use it, it's worth going over how we typically see pipes. . .

How To Configure Remote Access To Your Ubuntu Desktop Version 1.0 Author: Falko Timme <ft [at] falkotimme [dot] com> Last edited 01/23/2008 This guide explains how you can enable a remote desktop on an Ubuntu desktop so that you can access and control it remotely. This makes sense for example if you have customers that are not very tech-savvy. If they have a problem, you can log in to their desktops without the need to drive to their location. I will also show how to access the remote Ubuntu desktop from a Windows XP client and an Ubuntu client. I do not issue any guarantee that this will work for you! 1 Preliminary Note I have tested this on an Ubuntu 7.10 (Gutsy Gibbon) desktop. 2 Enabling The Remote Desktop We don't have to install anything to enable the remote desktop on Ubuntu. (JavaScript must be enabled in your browser to view the large image as an image overlay.) In the Remote Desktop Preferences window, you can configure the remote desktop connection. vncviewer falko-desktop:0 Then there are the security settings. Instead of

8 Useful and Interesting Bash Prompts Many people don’t think of their command prompt as a particularly useful thing, or even pay it much attention. To me, this is a bit of a shame, as a useful prompt can change the way you use the command line. Well I’ve scoured the Interwebs looking for the best, most useful, or sometimes most amusing bash prompts. Note – to use any of these prompts, you can copy & paste the “PS1=” line directly into your terminal. 1. This prompt is probably the most amusing one on the list, but remains useful. Example: Code: 2.Change color on bad command Here’s one of my favorites. 3. If you’re the type who wants to pack your prompt full of information, then here’s the one for you. 4. There’s nothing particularly fancy about this prompt, other than the good use of color to separate the different pieces of information. 5. This one’s a nice, clean, minimal 2-line prompt (plus a blank line at the top). Code: 6. Another nifty 2-liner, but this one’s got some info we haven’t used before. 7. 8.

Handbook of Applied Cryptography Alfred J. Menezes, CRC Press ISBN: 0-8493-8523-7 October 1996, 816 pages Fifth Printing (August 2001) The Handbook was reprinted (5th printing) in August 2001. The publisher made all the various minor changes and updates we submitted. You can identify the 5th printing of the book by looking for "5 6 7 8 9 0" at the bottom of the page that includes the ISBN number.

micha&#039;s resty at master - GitHub Welcome to VX Heavens! (VX heavens) Get sed savvy - part 3 We will learn about the sed delete (d), read (r) and write (w) commands today to round out your sed toolbox. The major parts I am covering should help you through 99% of the cases where sed is your best option. Soon we’ll be looking at awk and other tools to continue the quest for command-line fluency. If you haven’t already, install Cygwin and check out part 1 and part 2. Tutorial One of the best ways to crank out code quickly is by using templates. Suppose we have a template HTML file that we want to reuse often. Now we want to replace ”%%CONTENT%%” with the contents of an HTML Fragment file. The above script will append the contents of fragment.htmlf immediately after ”%%CONTENT%%”. This might seem slightly useless, but the power here is in the simplicity. OK, now for one more command: write (w). Now numbers.csv will contain all rows that the last cell containing numbers, and so on for letters.csv and symbols.csv. Other Examples Conclusion

Removing an object on a photo with GIMP Tutorial to remove objects (or people) and restore the portion of the background they hide in a photo with the Resynthesizer plugin. An impressive video has been posted on Youtube to show how, with Photoshop, it is possible to delete objects in an image automatically, without any design work. The same can be done with The Gimp in fact and for longer (it is not impossible that the same algorithm has been reused). This plugin "re-synthesizes" the background" and rebuilds it from same elements on the photo. First, see the Resynthesizer tutorial to know the purpose of controls. We will put in practice the commands using the same pictures that the Photoshop demonstration video. Using Resynthesizer in Script-Fu 1. 2. We want to remove the tree on the top left. 3. This windows is opened. 4.Here is the final image Using the Map -> Resynthesize filter To choose the sample that reconstructs the background, this command is necessary. 1. 2. 3. To remove the road, it is delimited with the lasso. 4. 5. More

Unix Toolbox Hardware | Statistics | Users | Limits | Runlevels | root password | Compile kernel | Repair grub | Misc Running kernel and system information # uname -a # Get the kernel version (and BSD version) # lsb_release -a # Full release info of any LSB distribution # cat /etc/SuSE-release # Get SuSE version # cat /etc/debian_version # Get Debian version Use /etc/DISTR-release with DISTR= lsb (Ubuntu), redhat, gentoo, mandrake, sun (Solaris), and so on. # uptime # Show how long the system has been running + load # hostname # system's host name # hostname -i # Display the IP address of the host. Hardware Informations Kernel detected hardware # dmesg # Detected hardware and boot messages # lsdev # information about installed hardware # dd if=/dev/mem bs=1k skip=768 count=256 2>/dev/null | strings -n 8 # Read BIOS Linux FreeBSD Load, statistics and messages The following commands are useful to find out what is going on on the system. Users Limits Per shell/script The shell limits are governed by ulimit. Misc