prints out the time for the timezone specified in $offsetutc. So you have less to think about things like: "I'm in utc+4 and my friend in utc-7, can I call him now or will I wake him?" Note: $offsetutc should be an integer between -12 and 12. Show Sample Output
sends commands specified in $commandfile to the telnet-server specified by $telnetserver.
to have newlines in $commandfile interpreted as ENTER, save the file in CR+LF (aka "Windows-Textfile") format.
if you want to save the output in a separate file, use:
nc $telnetserver 23 < $commandfile > $resultfile
extracts the debian-package $debfile to $extractdir, including all packaging-information. to repack the package, just type:
dpkg-deb -b $extractdir
I use this in a script on my openwrt router to check if my DynDNS needs to be updated, saves your account from being banned for blank updates. Show Sample Output
Same as original just no $ at start
Strips the non-ip information from the dig output. Could be combined with "head -1" to ensure a single ip is returned. Useful for outputting as a variable for use in scripts. Show Sample Output
A similar command that lists only the currently running VMs is thus:
VBoxManage list runningvms
...the above showing a list of VMs by name and UUID in the same format as the "$ VBoxManage list vms" command
Show Sample Output
you can launch a VirtualBox VM from the command line using VBoxManage, but that invokes it in a gui environment.
If you want to just fire off your VM in the background, use VBoxHeadless as shown. To get the names and UUIDs of your VirtualBox VMs, type:
VBoxManage list
Gets the internal and external IP addresses of all your interfaces, or the ones given as arguments Show Sample Output
Generates password consisting of alphanumeric characters, defaults to 16 characters unless argument given. Show Sample Output
-n 9000 : Number of requests to perform for the benchmarking session -c 900 : Number of multiple requests to perform at a time Show Sample Output
Uses the last argument of the last executed command, and gets the directory name from it. Use $!:t for the filename alone, without the dirname. Show Sample Output
Use the command watch, which is really hard to pass nested quotes to, and insert newlines where they are supposed to go in the HTTP request. that is after 1.1 after the host and two newlines at the end before the EOF. i use this all day what? no support for HEREDOCs on commandlinefu's interface? need more fu. Show Sample Output
If you want certain files out of a directory hierarchy, this will copy just the listed files, but will create the directory hierarchy in the new location ($DIR/)
Will return your internal IP address. Show Sample Output
This command uses the recursive glob and glob qualifiers from zsh. This will remove all the empty directories from the current directory down. The **/* recurses down through all the files and directories The glob qualifiers are added into the parenthesis. The / means only directories. The F means 'full' directories, and the ^ reverses that to mean non-full directories. For more info on these qualifiers see the zsh docs: http://zsh.dotsrc.org/Doc/Release/Expansion.html#SEC87
It will create a backup of the filename. The advantage is that if you list the folder the backups will be sorted by date. The command works on any unix in bash. 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: