Commands using sleep (289)

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

Attach screen over ssh
Directly attach a remote screen session (saves a useless parent bash process)

Find dead symbolic links
-L tells find to follow symbolic links, so -type l will only return links it can't follow (i.e., those that are broken).

function to compute what percentage of X is Y? Where percent/100 = X/Y => percent=100*X/Y
This function make it easy to compute X/Y as a percentage. The name "wpoxiy" is an acronym of "what percentage of X is Y"

delete multiple files with spaces in filenames (with confirmation)
ls -Q will show the filenames in quotes. xargs -p rm will print all the filenames piped from ls -Q and ask for confirmation before deleting the files. without the -Q switch, if we have spaces in names, then the files won't be deleted.

Compute newest kernel version from Makefile on Torvalds' git repository
The platform-agnostic version of https://www.commandlinefu.com/commands/view/25276/compute-newest-kernel-version-from-makefile-on-torvalds-git-repository because macOS doesn't have wget installed

Create a mirror of a local folder, on a remote server
Create a exact mirror of the local folder "/root/files", on remote server 'remote_server' using SSH command (listening on port 22) (all files & folders on destination server/folder will be deleted)

Slugify: converts strings in any language into Slugs (friendly names to use in URLs and filenames)
Slug the part of an URL which identifies a page using human-readable keywords. Slugs are used to construct friendly URLs (often for permalinks) that are easy to type, descriptive, and easy to remember.

Virtualbox rsync copy (without defining any virtualbox configuration)
That is, after running `vagrant ssh-config` to determine ports and ip's: $ vagrant ssh-config Host default HostName 127.0.0.1 User vagrant Port 2200 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no IdentityFile /Users/romanvg/tmp/.vagrant/machines/default/virtualbox/private_key IdentitiesOnly yes LogLevel FATAL

sum a column of numbers

need ascii art pictures for you readme text ?
Require boxes and / or cowsay packages. After input boxes -d dog , type your text and then press ctrl + d . Same goes for cowsay .


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: