mkdir options are not clear mkdir options are not clear unix unix

mkdir options are not clear


As you say in your edit, this is a line in a rc.init file which contains information for the init process on a *nix system. The "words"/fields have specified meanings. The first one is a "command" to the init process, but does not necessarily correspond to an existing binary or shell script in the path. Instead, it is a key word which specifies what the init process is to do. As the name suggests, the "mkdir" keyword instructs it to make a directory; but it could as well be named "makedirectory" or whatever. The specific syntax for it is

mkdir <path> [mode] [owner] [group]

In your example

mkdir /cache 0770 system cache
  • the directory path is /cache (in the root directory)
  • the mode is 0770 (give user and group all rights to read, write and execute; give anybody else no rights)
  • make user "system" the owner
  • make group "cache" the group.

For a list of possible init commands in android, cf. this list.