Re: Linux question

new topic     » goto parent     » topic index » view thread      » older message » newer message

Mike Nelson wrote:

> What is the Linux equivalent of the following DOS command?
>
> IF EXIST FILE1.TXT DEL FILE1.TXT

rm -f file1.txt

> (Does rm complain if you try to delete a non-existent file?)

Not if you use the -f (force) flag.

(It's a good job I parsed the DOS command as a whole, because doing an IF
EXIST usually depends on the shell you're using. ;) )

Carl

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu