Sign in to follow this  
Followers 0
Spyril

CommandLineFu.com

10 posts in this topic

Yeah, that's pretty neat. Lot's of thing's I haven't thought of or seen.

0

Share this post


Link to post
Share on other sites
http://www.commandlinefu.com/commands/browse

This is neat. It's classic unix command-line fu meets Web 2.0. Thus far, many of the bash one-liners are pretty useless, but with enough community participation, I could see this becoming very interesting and useful.

One-liners are almost always completely situational - you might have this awesome one that does what-have-you, but it's not usually not useful to someone else in what they're trying to do.

I think it's kind of a rad site for learning new general tricks and shortcuts though. I'm definately going to keep it in mind for the next time I need to clunk together a shell script to do something like reformat a text file.

0

Share this post


Link to post
Share on other sites

Some kind of interesting stuff there; they need a better means to sort/group items though. There is enough highly-specific stuff that I'll never need that makes it kind of hard to sift through for something useful. Amusing stuff, too. For fun, sort it by popularity ( http://www.commandlinefu.com/commands/browse/sort-by-votes ) and then go to the very bottom of the list.

This one in particular caught my eye: http://www.commandlinefu.com/commands/view...k-code-must-die

:)

0

Share this post


Link to post
Share on other sites

Ya that one was amusing.

I also gave a chuckle at http://www.commandlinefu.com/commands/view...ferior-software

I don't know why it is rated bad. I guess most of the voters use inferior software.  :P

Kindly Please Explain what "alias emacs='rm -rf ~/'" does lol I'm not that leet. :)

0

Share this post


Link to post
Share on other sites

Ya that one was amusing.

I also gave a chuckle at http://www.commandlinefu.com/commands/view...ferior-software

I don't know why it is rated bad. I guess most of the voters use inferior software.  :P

Kindly Please Explain what "alias emacs='rm -rf ~/'" does lol I'm not that leet. :)

It deletes your home directory if you try to run emacs.

0

Share this post


Link to post
Share on other sites
Kindly Please Explain what "alias emacs='rm -rf ~/'" does lol I'm not that leet. :)

Emacs is one of the two prominent text editors historically available by default on a linux/unix system. (Nowadays you can have your choice of 30 or more when you install, but once upon a time it was Emacs and Vi.) To invoke the Emacs editor, one would normally type emacs on the command line. The above command sets up an alias -- rather like a command-line shortcut -- that makes it so that typing emacs will instead execute the command rm -rf ~/. This particular command, when run, will forcibly delete every single file in the user's home directory (e.g. their "My Documents" folder). You may get lucky if your distribution is set to prompt for deletion by default... otherwise, you would simply not see anything happen for a bit after pressing the Enter key, then you would break out into a cold sweat when you noticed that all your files were gone.

You could even make it a bit more malevolent by typing: alias emacs='emacs && yes | rm -rf ~/' ... which would, in fact, let you run the emacs editor once, then delete your files when you exit (the "yes" program would simply answer "y" to each question in the case of being prompted for deletion).

To sum up... this sneaky command was composed by someone who is on the Vi side of the Editor Wars. :)

0

Share this post


Link to post
Share on other sites
...the "yes" program would simply answer "y" to each question in the case of being prompted for deletion...

The '-f' option forces the action to proceed. "-f --force: forces nonexistent files, never prompt."

Edited by SwartMumba
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0