commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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:
trying to copy all your dotfiles from one location to another, this may help
There are 7 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.
This is possible with 'find', but is quite verbose:
find -maxdepth 1 -regex '^\./\..*' -printf '%f\n' | sortpiping through 'sort' to match default output of 'ls'.
If the goal of "\w" in the regexp is to avoid listing . and .. then ls has the -A option.
ls -1d .*no need grep here...
Or simply $ ls .[tab]
@pysquared considered find but as you mentioned, it is a bit to verbose.
@rbossy the goal of the \w is to filter the results to return only dotfiles and folders but exclude '.' & '..' at the same time.
The following code does not work in the context of searching dotfiles
'ls -aA .*'@sputnick
ls -1d .*.
..
So I would still need to inverse grep the results anyway
ls -1d .[[:alnum:]]*@sputnick nice one
@kulor: c'mon, if you use -A instead of -a, the \w in the regexp is useless.
@sputnik: I think it does not exclude . and ..
@pysquared: -name ".*". No need regex.
@unixmonkey7109: I tried -name ".*", but it does not exclude ".".