Commands using ssh (347)

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

list files recursively by size

List all files in current dir and subdirs sorted by size
or $ tree -ifsF --noreport .|sort -n -k2|grep -v '/$' (rows presenting directory names become hidden)

Get the total length of time in hours:minutes:seconds (HH:MM:SS) of all video (or audio) in the current dir (and below)
change the *.avi to whatever you want to match, you can remove it altogether if you want to check all files.

pretend to be busy in office to enjoy a cup of coffee
Not as taxing on the CPU.

Adding Prefix to File name
Adding course name prefix to lecture pdfs

power off system in X hours form the current time, here X=2

put command in a loop to keep trying a connection
This will keep trying to reconnect your netcat connection can be used with SSH or Telnet, just substitute nc for ssh or telnet very useful for troubleshooting VPNs were you want to send continuous packets towards a destination to trace.

Show permissions of current directory and all directories upwards to /
NB not 'namei -m .', as it slices the path you give it.

Mount a windows partition in a dual boot linux installation with write permission...[Read and Write]
If you have the library installed ntfs-3g, you will be able to mount the windows partition and write on it....

grep for minus (-) sign
Use flag "--" to stop switch parsing


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: