What is rm and -rf mean in gams

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

What is rm and -rf mean in gams

Post by Archiver »



Hi everyone,

I met a problem when I read gams' example. Does anyone know what
does syntax $call rm -rf bchdicut*.gdx mean? what is rm and -rf
represented to in this syntax? In addition, I do not find the file
bchdicut*. gdx in gams. Could anybody helps me this this problem?

Thank you so much!!
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: What is rm and -rf mean in gams

Post by Archiver »

Reply-to: gamsworld@googlegroups.com


Sometime in March, woshidongyang@gmail.com proposed the following:

|
| Hi everyone,
|
| I met a problem when I read gams' example. Does anyone know what
| does syntax $call rm -rf bchdicut*.gdx mean? what is rm and -rf
| represented to in this syntax? In addition, I do not find the file
| bchdicut*. gdx in gams. Could anybody helps me this this problem?

rm is the unix command to delete files or directories.

-rf is the argument given to rm to delete recursively (r)
and to force (f) deletion (ie, not prompt the user for confirmation).

bchdicut*.gdx means that any file or directory that begins with bchdicut
and ends with .gdx will be deleted.


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: What is rm and -rf mean in gams

Post by Archiver »



Hi Harrod,

Thank you so much for you answer. But I am still not very
understand about rm and -rf. Could you please show me an example of
that, how this syntax implemented? In addition, when should we use
this kind of syntax?

I appreciate your help a lot!

On Mar 11, 9:33 pm, John Harrold wrote:
> > Sometime in March, woshidongy...@gmail.com proposed the following:
> >
> > |
> > | Hi everyone,
> > |
> > | I met a problem when I read gams' example. Does anyone know what
> > | does syntax $call rm -rf bchdicut*.gdx mean? what is rm and -rf
> > | represented to in this syntax? In addition, I do not find the file
> > | bchdicut*. gdx in gams. Could anybody helps me this this problem?
> >
> > rm is the unix command to delete files or directories.
> >
> > -rf is the argument given to rm to delete recursively (r)
> > and to force (f) deletion (ie, not prompt the user for confirmation).
> >
> > bchdicut*.gdx means that any file or directory that begins with bchdicut
> > and ends with .gdx will be deleted.
> >
> > --
> > John M Harrold
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: What is rm and -rf mean in gams

Post by Archiver »



Sometime in March, woshidongyang@gmail.com proposed the following:

|
| Hi Harrod,
|
| Thank you so much for you answer. But I am still not very
| understand about rm and -rf. Could you please show me an example of
| that, how this syntax implemented? In addition, when should we use
| this kind of syntax?
|
| I appreciate your help a lot!

Ok, well $call tells gams to execute a command in the operating system.

$call rm -rf bchdicut*.gdx

Everything after call is either a command or command line arguments. Are
you using a Unix system (e.g. linux?). The person who wrote the gams file
you're using wanted to delete some files, specifically they wanted to
delete all of files that matched the pattern bchdicut*.gdx. If you want to
know about the rm command, you can type the following at the command line:

man rm


Post Reply