calculate if "$1" is a number ... decimals included :)
The Pomodoro Technique is a time management method developed by Francesco Cirillo in the late 1980s. The technique uses a timer to break down periods of work into 25-minute intervals called 'Pomodori' (from the Italian word for 'tomatoes') separated by short breaks. You need to prepare a short .wav file (the "ring.wav" in the sample command line). This command will trigger aplay to play ring.wav 25 minutes from now on, which can be used as a poor man's pomodoro timer. Show Sample Output
Reason can be: taken, available, contains_banned_word
I have found that base64 encoded webshells and the like contain lots of data but hardly any newlines due to the formatting of their payloads. Checking the "width" will not catch everything, but then again, this is a fuzzy problem that relies on broad generalizations and heuristics that are never going to be perfect. What I have done is set an arbitrary threshold (200 for example) and compare the values that are produced by this script, only displaying those above the threshold. One webshell I tested this on scored 5000+ so I know it works for at least one piece of malware.
This command will install phpmyadmin, set apache2 server and restart apache2. After running this command you can open phpmyadmin on http://yoursite.com/phpmyadmin
Replace the first part of the command above with the appropriate timezone string. Eg: 'Europe/London' or for UTC - 'Etc/UTC'. The appropriate string can be found from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones This is useful when your server is installed by a data centre (managed hardware, VPS, etc) and the timezone is not usually set to the one your prefer.
list all java process info.
Well, this is quite useful for testing if your hardware watchdog is working properly.
git gc should be run on all git repositories every 100 commits. This will help do do so if you have many git repositories ;-)
This command is useful for searching through a whole folder worth of pdf files. Show Sample Output
some numbers have strange output! some numbers output nothing! some numbers will kill your terminal! even logout when running in tty but i don't know why! can anyone explain it to me?
Prints an easy-to-copy color code for each color. Show Sample Output
Need to encrypt something from the command line? I've used this before to encrypt passwords with a master password that was shared amongst a team. To decrypt: ~$ echo -n 'jA0EAwMCPdknsznAww5gySL1/quqhXg6QgQkIz5abzGP5EZgTbXCFU+y6dP8ySWovytc' | base64 --decode | gpg --decrypt gpg: CAST5 encrypted data Enter passphrase: secret gpg: encrypted with 1 passphrase HelloWorld! Show Sample Output
change gpeXX by the culprit you discovered on phase 1 In case of this example, the culprit is the biggest number, ie, gpe1C /sys/firmware/acpi/interrupts/ff_gbl_lock: 0 enabled /sys/firmware/acpi/interrupts/gpe01: 0 enabled /sys/firmware/acpi/interrupts/gpe06: 0 enabled /sys/firmware/acpi/interrupts/gpe17: 2 enabled /sys/firmware/acpi/interrupts/gpe18: 0 enabled /sys/firmware/acpi/interrupts/gpe1C: 19 enabled This procedure,if solved this universal issue all linix distros are experimenting for more than 2 years, may be included at startup, via cron. But try first commandline.
Using PHP shell to URL decode a string. Show Sample Output
This command takes all CR2 files in the current directory and convert them into JPG
Set variable 'input' to a set of flac files.
Support several arguments. Show Sample Output
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: