change user password one liner
Change /dev/sda with the Disk or partition you want to back-up
To restore use:
dd if=~/backup-disk-YY-MM-DD.img of=/dev/sda
Once again change /dev/sda accordingly
Source: http://www.go2linux.org/linux/2010/09/small-tip-back-disks-clone-hard-disk-773
the maven.test.skip property can be added to other goals too.
Prepends all directory items with "prependtext"
Searching for a String in Multiple Files With Grep Show Sample Output
compile and install openvm-tools module in debian lenny
This is useful when you got a reserved IP address like 192.168.0.100 and want to find out what IP address is used to access the Internet. You have to know a server with 'efingerd -n' configured, like www.linuxbanks.cn as above. Other method to find out this information are for example access www.tell-my-ip.com and grep the output. The finger method have the advantage that it is easy to deploy a service like www.tell-my-ip.com, as you only need to get efingerd installed.
Usefull e.g. in krusader open terminal function
Perfect time for the rarely used sub shell.
Display the machine "hardware name" 32 or 64 bit.
"x86_64" is shown on 64 bit machines
"i686" is typically shown on 32 bit machines (although, you might also see "i386" or "i586" on older Linuxen).
On other "unix-like" systems, other hardware names will be displayed.
For example, on AIX, "uname -m" gives the "machine sequence number".
For whatever reason, IBM decided that "uname -M" would give the machine type and model.
(ref: http://www.ibm.com/developerworks/aix/library/au-aix-systemid.html )
On Sun Solaris, "uname -m" can be used to determine the chip type and "isainfo -v" will reveal
if the kernel is 64 or 32 bit.
(ref: http://www.ibiblio.org/pub/packages/solaris/sparc/html/32.and.64.bit.packages.html )
A more reliable way to determine "64-bit ness" across different Unix type systems is to compile the following simple C program:
cat <<eeooff > bits.c
/*
* program bits.c
* purpose Display "32" or "64" according to machine type
* written January 2013
* reference http://www.unix.org/whitepapers/64bit.html
*/
/* hmm, curious that angle-brackets removed by commandlinefu.com data input processing? */
#include "/usr/include/stdio.h"
long lv = 0xFFFFFFFF;
main ( ) {
printf("%2d\n",(lv < 0)?32:64);
}
eeooff
Compile and run thusly: cc -o bits bits.c; ./bits
Show Sample Output
Writes out the shebang line (#!/bin/bash) to the script.
xargs will automatically determine how namy args are too many and only pass a reasonable number of them at a time. In the example, 500,002 file names were split across 26 instantiations of the command "echo". Show Sample Output
Can pipe to tail or change the awk for for file size, groups, users, etc. Show Sample Output
Every 20 minutes test if host with IP 192.168.0.14 is 'dead' or not reachable. The line should be put in your crontab file.
With counter format [001, 002, ..., 999] , nice with pictures or wallpapers collections.
bash
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: