一些常用Linux, Unix 命令
2013-07-19 17:07
483 查看
1. Communication between two Linux systems.
SSH (Secure SHell):
SSH’s main job is to provide access to acommand-line over a network.
ssh <username>@<computer name or IPaddress>
ssh joe@laptop
ssh mike@192.168.1.1
scp ~/home/test joe@192.168.118.18:~/home
sftp avoids that massive security risk bytransmitted everything in encrypted form. It is much, much harder to intercept.
When sshd receives a request for connection from aclient, it creates a new process for that particular connection.
sshfs make a remote file system available over SSHact as if it was inside a folder on your own system.
PuTTY is a popular graphical SSH client and itsupports Windows and Linux.
2. Unix Soft (Symbolic) Link and Hard Link
ln [-f] [-n][-s] existingfile newname
-f: Link files without questioning the user,even if the mode of target forbids writing. This is the default if the standardinput is not a terminal.
-n: Does not overwrite existing files.
-s: Make it so that it does not create a symboliclink.
The difference between hard and symbolic link:
Unix filesconsist of two parts: the data part and the file name part.
The file namepart carries a name and an associated inode number.
The data partis associated with something called “inode”.
More than onefile name can reference the same inode number, there files are said to be “hardlinked” together.
“hard link”is also considered as an alias name of the file.
On the other hand, there is a special file type whose data part carries a path to another file. Since it is a special file, the OS recognizes the data as a path, andredirects opens, reads, and writes so that, instead of accessing the datawithin the special
file, they access the data in the file named by the data inthe special file. This special file is called a “soft link” or “symbolic link”.
“ln –s test softln”
“ln test hardln”
1) When create one hard link, the inode count + 1. If file linked is deleted, because the inode count > 0, so the real file can not be restored and the inodecount - 1. The hard link is also useful to access the target file.
2) Because when create a symbolic link, it creates a new inode, so soft links can be used between different systems or partitions.
“test” and “hardln”reference to the content of “test”.
“softln” is linked with the file reference “test”.
When remove “test”,we can also use hardln to access the content of “test”, but softln has error and can not see the content of test again by accessing softln.
SSH (Secure SHell):
SSH’s main job is to provide access to acommand-line over a network.
ssh <username>@<computer name or IPaddress>
ssh joe@laptop
ssh mike@192.168.1.1
scp ~/home/test joe@192.168.118.18:~/home
sftp avoids that massive security risk bytransmitted everything in encrypted form. It is much, much harder to intercept.
When sshd receives a request for connection from aclient, it creates a new process for that particular connection.
sshfs make a remote file system available over SSHact as if it was inside a folder on your own system.
PuTTY is a popular graphical SSH client and itsupports Windows and Linux.
2. Unix Soft (Symbolic) Link and Hard Link
ln [-f] [-n][-s] existingfile newname
-f: Link files without questioning the user,even if the mode of target forbids writing. This is the default if the standardinput is not a terminal.
-n: Does not overwrite existing files.
-s: Make it so that it does not create a symboliclink.
The difference between hard and symbolic link:
Unix filesconsist of two parts: the data part and the file name part.
The file namepart carries a name and an associated inode number.
The data partis associated with something called “inode”.
More than onefile name can reference the same inode number, there files are said to be “hardlinked” together.
“hard link”is also considered as an alias name of the file.
On the other hand, there is a special file type whose data part carries a path to another file. Since it is a special file, the OS recognizes the data as a path, andredirects opens, reads, and writes so that, instead of accessing the datawithin the special
file, they access the data in the file named by the data inthe special file. This special file is called a “soft link” or “symbolic link”.
“ln –s test softln”
“ln test hardln”
1) When create one hard link, the inode count + 1. If file linked is deleted, because the inode count > 0, so the real file can not be restored and the inodecount - 1. The hard link is also useful to access the target file.
2) Because when create a symbolic link, it creates a new inode, so soft links can be used between different systems or partitions.
“test” and “hardln”reference to the content of “test”.
“softln” is linked with the file reference “test”.
When remove “test”,we can also use hardln to access the content of “test”, but softln has error and can not see the content of test again by accessing softln.
相关文章推荐
- Unix/Linux常用的一些命令--转贴我注明
- linux unix 常用的一些命令
- linux or unix 常用命令
- Linux下的一些SSH常用命令总结
- linux一些常用命令
- linux 一些常用的基本命令
- linux的一些常用命令
- 我所接触到的一些常用Linux命令和用法(初学者献丑了)每日更新.......
- unix/Linux常用命令英文全称与中文解释 man ,su,ps,ls 等等
- linux 使用hadoop中常用的一些命令
- 关于linux中vim常用的一些命令
- Linux下的一些SSH常用命令总结
- UNIX/Linux&nbsp;常用解压缩命令用法
- 常用的一些Linux命令
- linux中一些常用的命令总结
- Linux-Unix系统操作与维护常用命令
- linux的一些常用命令
- linux的一些常用命令
- LINUX和UNIX常用命令(初级篇1)
- LInux脚本执行一些常用命令