`

Linux Basics - 1

阅读更多

1> linux file types:
ordinary, directory, block(harddisk...device), character(crt,...)

2> file name:
256 characters

3> directories:
/bin Contains the Linux system commands and programs (also called binaries). Pronounced "slash bin."

/dev Contains special device files that correspond to hardware components. Pronounced "slash dev."

/etc Contains configuration files for Linux and other installed software. Pronounced "slash et-see."

/home Contains the home directories (personal storage) for each user on the system. Pronounced "slash home."

/sbin Contains more Linux binaries (special utilities not for general users). Pronounced "slash ess-bin."

/root The home directory for the root user; not to be confused with /. Some Linux systems use /home/root instead of /root. Pronounced "slash root."

/usr  Contains system programs and other files for general users such as games, online help, and documentation. By convention, a user should not put personal files in this directory. Pronounced "slash user."

4> cd, ls -l, cat, more, cp, mv, touch, echo >..., cat > fox.file ^D, mkdir, rm, rmdir, wildcard(*),

5> change permissions:

The general form of the chmod command is

chmod <permission flags> <file or directory name(s)>

To tell chmod the new permissions for a file, you can use any combination of these permission flag characters:

WHO IT APPLIES TO ACCESS CHANGE ACCESS TYPE
(pick one or more) (pick one) (pick one or more)
u For the owner + Grant access r For read access
g For the group - Deny access w For write access
o For all others x For execute access

Here are some examples:

chmod o-r pig_info Remove read access from all others.

chmod g+rw pig_info Grant read and write access to group.

chmod ugo+x zippity Grant execute access to everybody.

6> Transfer ownership:

Transferring Ownership of a File Using Chown

If you are logged in as root, you can transfer ownership of a file or directory (if you move it into another user's directory) using the chown command.

To tell chown what to do, just give it the new owner and the file name, like this:

chown sigmund zippity

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics