Here's a version that doesn't use find.
This command will disable a guest user logon, this user don't have password to login in the system. Show Sample Output
Removes trailing newline; colon becomes record separator and newline becomes field separator, only the first field is ever printed. Replaces empty entries with $PWD. Also prepend relative directories (like ".") with the current directory ($PWD). Can change PWD with env(1) to get tricky in (non-Bourne) scripts. Show Sample Output
KDE4 is great, but still a bit buggy, and sometimes plasma requires to be restarted. Instead of quitting it with "killall plasma", which might loose your preferences (widgets, etc.), kquitapp will cleanly quit it. Tip: you can type this in the "Alt+F2" window, and then type "plasma" in Alt+F2 again to restart plasma (be patient though...).
The sample command searches for PHP files replacing tabs with spaces.
-u NONE # don't use vimrc
Instead of
retab!
one may pass
retab! 4
for instance.
Look at this http://susepaste.org/69028693 also
Here's the other way of doing it in vim: setting a recursive macro. 'gg' brings you to the top of the buffer, 'qqq' clears the 'q' macro, 'qq' starts recording a macro called 'q', '/^$' moves the cursor to the next empty line, 'dd' deletes the line that the cursor is on, '@q' calls the 'q' macro (currently empty because of 'qqq'), and 'q' stops recording the macro. '@q' calls the macro. It will run until it cannot find another blank line, at which point it will throw up an error and cease. While this is longer than the regex, you can use it without having to move your thoughts from 'vim-mode' to 'regex-mode'.
You can use this command to delete CVS/svn folders on given project.
#Sample Usage: # git commit -m"Jira #404 - `whatthecommit`" # Show Sample Output
ip.telize.com (Listen on both IPv4 and IPv6) ip4.telize.com (Listen on IPv4 only) ip6.telize.com (Listen on IPv6 only) More information on : http://www.telize.com
Muestra el crecimiento de un archivo por segundo. Cambia el texto "FILE" por el nombre del archivo a monitorear. Comando STAT
If you have a directory with many working copies of various subversion projects and you want to update them all at once, this one may be for you. Show Sample Output
This awk command prints a histogram of the number of times 'emergency' is the first word in a line, per day, in an irssi (IRC client) log file. Show Sample Output
You should install qpdf. That way, you can have a copy without any password required.
Number of days back: change/append arbitrary amount of '\|'$[$(date +%Y%j)-x] expressions or specify any n-th day before today for a single day (you have to replace x with 3, 4, 5, whatever ... above I replaced it with 1 and 2 to get listing for yesterday and day before yesterday and 0 for today was not necessary, so left out).
Q: How to narrow to *.pdf , *.png, *.jpg, *.txt, *.doc, *.sh or any type of files only?
A: Pipe to grep at the end of command.
Even shorter:
cd && day=3;for a in $(seq $day -1 0);do tree -aicfnF --timefmt %Y%j-%d-%b-%y|grep $[$(date +%Y%j)-$a];done
Here it's only needed to change amount of variable day to list period of days back - here is set to three days back (the seq command is adjusted for listing the oldest stuff first).
Show Sample Output
You can get an approximate idea of how long your data export might take. Show Sample Output
Finds the line number matching the regex, then passes that to BC for some math, passes that to head, and uses tail to trim off the unwanted section at the top. The whole thing is spit out to a script that can then be shared or run. Comes in handy for reading select sections from error logs.
Randomize GNU grep's colors 31-36 excluding black and white.
For all lines, sum the columns following the first one, and then print the first column plus the sum of all the other columns. example input: 1,2,3,4,5 2,2,3,4,5 becomes 1,14 2,14
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: