Commands by mipmip (1)

  • 1. Sends an email to announce the start of the command 2. Raw data copy of block device over ssh to a new host 3. Sends an email to announce the end of the command Make sure the lvm device at the other side exists and has the same amount of logical units.


    0
    echo "dd start" | mail -s ready pete@example.com; dd if=/dev/system/machine-disk | ssh -c blowfish root@destination.example.com dd of=/dev/system/machine-disk ; echo "dd ready" | mail -s ready pete@example.com
    mipmip · 2016-03-01 13:13:20 0

What's this?

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.

Share Your Commands


Check These Out

runs a X session within your X session
http://www.debian-administration.org/article/Running_multiple_X11_sessions

Speak the top 6 lines of your twitter timeline every 5 minutes.....
Pump up the chatter, run this script on a regular basis to listen to your twitter timeline. This is a rough first cut using several cli clips I have spotted around. There is no facility to not read those things already read to you. This could also easily be put in a loop for timed onslaught from the chatterverse, though I think it might violate several pointsof the Geneva Convention UPDATE - added a loop, only reads the first 6 twits, and does this every 5 mins.

Restart openssh-server on your Synology NAS from commandline.
The correct way to restart openssh-server on your synology nas.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Use vim automation to create a colorized html file

Use Dell Service Tag $1 to Find Machine Model [Model Name and Model Number]
255 Max Characters CommandLineFu for $dellurl='http://support.dell.com/support/topics/global.aspx/support/my_systems_info/en/details?c=us&cs=04&l=en&s=hied&ServiceTag='

list block devices
Shows all block devices in a tree with descruptions of what they are.

Get your external IP address ( 10 characters long )
Shortest url to a external IP-service, 10 characters.

Find passwords that has been stored as plain text in NetworkManager

list ips with high number of connections


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: