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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值