Linked by Thom Holwerda on Thu 25th Jan 2007 00:43 UTC
Microsoft "Once upon a time, when DOS walked the earth, the command line was the primary user interface for most of our computers. Then, Windows came along, and Microsoft seemed set on leaving the command prompt to dry up and wither into obscurity. Fortunately, Microsoft has again turned its attention to the command line and, in so doing, has produced one of the most compelling new Windows features eWEEK Labs has ever had the pleasure to test: Windows PowerShell."
Thread beginning with comment 205543
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Once upon a time
by ari-free on Thu 25th Jan 2007 05:10 UTC in reply to "RE[2]: Once upon a time"
ari-free
Member since:
2007-01-22

ok I'll give an example of unintuitiveness.
let's say you want to delete all files with extension .txt and you type this
rm * .txt

oops forgot I added a space
oops thanks for not telling me I will wipe out all the files and just do it anyway.
Powershell requires confirmation

Edited 2007-01-25 05:12

Reply Parent Bookmark Score: 2

RE[4]: Once upon a time
by abraxas on Thu 25th Jan 2007 05:14 in reply to "RE[3]: Once upon a time"
abraxas Member since:
2005-07-07

ok I'll give an example
let's say you want to delete all files with extension .txt and you type this
rm * .txt

oops forgot I added a space
oops thanks for not telling me I will wipe out all the files and just do it anyway.
Powershell requires confirmation


If you're that careless then turn interactive mode on. Problem solved.

Reply Parent Bookmark Score: 5

RE[4]: Once upon a time
by flav2000 on Thu 25th Jan 2007 05:24 in reply to "RE[3]: Once upon a time"
flav2000 Member since:
2006-02-08

ok I'll give an example of unintuitiveness.
let's say you want to delete all files with extension .txt and you type this
rm * .txt

oops forgot I added a space
oops thanks for not telling me I will wipe out all the files and just do it anyway.
Powershell requires confirmation


well... just add
alias rm 'rm -i'
to your .login file or .cshrc (depending on your shell)

problem solved - confirmation for every deletion

Reply Parent Bookmark Score: 4

RE[5]: Once upon a time
by twenex on Thu 25th Jan 2007 09:22 in reply to "RE[4]: Once upon a time"
twenex Member since:
2006-04-21

I think it's a REALLY BAD idea to alias rm to "rm -i". Not because I'm implacably opposed to interactive deletion (i'm not) but because (a) it might screw up scripts which rely on rm NOT being interactive to work properly; and (b) what happens when you move to the machine of someone who has NOT aliased rm to "rm -i"?

Far better to alias "rmi"to "rm -i" "mvi"to "mv -i" etc, and use those instead. Then when you use a system that uses the default behaviour for "rm" and doesn't have those aliases, it'll say "rmi... not found."

Reply Parent Bookmark Score: 5

RE[4]: Once upon a time
by dcwrwrfhndz on Thu 25th Jan 2007 06:30 in reply to "RE[3]: Once upon a time"
dcwrwrfhndz Member since:
2006-05-26

(sh/bash)
alias rm='rm -i'

(csh/tcsh)
alias rm rm -i

Reply Parent Bookmark Score: 2

RE[4]: Once upon a time
by Clinton on Fri 26th Jan 2007 04:35 in reply to "RE[3]: Once upon a time"
Clinton Member since:
2005-07-05

Bash is not unintuitive. It is powerful and demands that you respect that power. For example, you could easily implement a "Trash" mechanism in Bash so if you did type that command, your files would be easily retrievable.

I HATE the idea of a shell asking me if I'm sure every time I type a command.

Reply Parent Bookmark Score: 1

RE[4]: Once upon a time
by DElyMyth on Fri 26th Jan 2007 08:36 in reply to "RE[3]: Once upon a time"
DElyMyth Member since:
2007-01-26

I did something similar some time ago, but it was a chown -R in the /etc directory...
It was solely my fault and I'm only blaming myself because I didn't double-check what I was typing and where.

And, btw, with confirmations for every single deletion, sooner or later you'll switch to the "hit enter without reading" side, and the advantages of the confirmations are gone.

Reply Parent Bookmark Score: 1