mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
申请翻译 Forget Technical Debt —Here'sHowtoBuild Technical Wealth (#4706)
* 翻译完成 4 Useful Way to Know Plugged USB Device Name in Linux 翻译完成 * Delete 20161031 4 Useful Way to Know Plugged USB Device Name in Linux.md 翻译完成 * 申请翻译 Forget Technical Debt —Here'sHowtoBuild Technical Wealth 申请翻译
This commit is contained in:
parent
eb99fa5a35
commit
0446205dbf
@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
### rusking translating
|
||||||
|
|
||||||
# Forget Technical Debt —Here'sHowtoBuild Technical Wealth
|
# Forget Technical Debt —Here'sHowtoBuild Technical Wealth
|
||||||
|
|
||||||
[Andrea Goulet][58] and her business partner sat in her living room, casually reviewing their strategic plan, when an episode of This Old House came on television. It was one of those moments where ideas collide to create something new. They’d been looking for a way to communicate their value proposition — cleaning up legacy code and technical debt for other companies. And here they were, face to face with the perfect analogy.
|
[Andrea Goulet][58] and her business partner sat in her living room, casually reviewing their strategic plan, when an episode of This Old House came on television. It was one of those moments where ideas collide to create something new. They’d been looking for a way to communicate their value proposition — cleaning up legacy code and technical debt for other companies. And here they were, face to face with the perfect analogy.
|
||||||
|
@ -0,0 +1,100 @@
|
|||||||
|
4 Useful Way to Know Plugged USB Device Name in Linux
|
||||||
|
在Linux系统里识别USB设备名字的4种方法
|
||||||
|
============================================================
|
||||||
|
|
||||||
|
对于初学者来说,在Linux系统里你必须掌握的技术之一就是识别出插入系统里的各种设备。这也许是你的系统硬盘,外部的存储设备或者是可移动设备,比如USB设备或SD闪存卡等。
|
||||||
|
|
||||||
|
现如今,使用USB设备来传输文件是十分常见的事,对于那些喜欢使用命令行的新手来说,当你需要格式化USB设备时,学会使用不同的方法来识别USB设备名是非常重要的。
|
||||||
|
|
||||||
|
如果你插入一个设备到你的系统中,尤其是在桌面环境下,比如USB设备,它会自动挂载到一个指定目录,正常情况下是在/media/username/device-label目录下,之后你就可以进入到该目录下访问那些文件了。然而,在服务器上就不是这么回事了,你必须手动挂载这个设备,并且指定一个挂载点。
|
||||||
|
|
||||||
|
Linux系统使用/dev目录下特定的设备文件来标识插入的设备。你会发现该目录下的某些文件,包括/dev/sda或者/dev/sha表示你的第一个主设备,每个分区使用一个数字来表示,比如/dev/sda1或/dev/sha1表示主设备的第一个分区等等。
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ls /dev/sda*
|
||||||
|
```
|
||||||
|
[
|
||||||
|
![List All Linux Device Names](http://www.tecmint.com/wp-content/uploads/2016/10/List-All-Linux-Device-Names.png)
|
||||||
|
][3]
|
||||||
|
|
||||||
|
列出Linux系统下所有的设备名
|
||||||
|
|
||||||
|
现在咱们来使用下面一些特殊的命令行工具找出设备名:
|
||||||
|
|
||||||
|
### 使用df命令来找出插入的USB设备名
|
||||||
|
|
||||||
|
查看插入你系统里的每一个设备及对应的挂载点,你可以使用下图中的df命令检查Linux系统磁盘空间使用情况:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ df -h
|
||||||
|
```
|
||||||
|
[
|
||||||
|
![Find USB Device Name Using df Command](http://www.tecmint.com/wp-content/uploads/2016/10/Find-USB-Device-Name.png)
|
||||||
|
][5]
|
||||||
|
|
||||||
|
使用df命令查找USB设备名
|
||||||
|
|
||||||
|
### 使用lsblk命令查找USB设备名
|
||||||
|
|
||||||
|
你也可以使用下面的lsblk命令(列出块设备)来列出插入你系统里的所有块设备:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ lsblk
|
||||||
|
```
|
||||||
|
[
|
||||||
|
![List Linux Block Devices](http://www.tecmint.com/wp-content/uploads/2016/10/List-Linux-Block-Devices.png)
|
||||||
|
][7]
|
||||||
|
|
||||||
|
列出Linux系统里的块设备
|
||||||
|
|
||||||
|
### 使用fdisk工具识别USB设备名
|
||||||
|
|
||||||
|
fdisk是一个功能强大的工具,用于查看你系统中的所有分区表,包括所有的USB设备,使用root权限执行如下命令:
|
||||||
|
```
|
||||||
|
$ sudo fdisk -l
|
||||||
|
```
|
||||||
|
[
|
||||||
|
![List Partition Table of Block Devices](http://www.tecmint.com/wp-content/uploads/2016/10/List-Partition-Table.png)
|
||||||
|
][9]
|
||||||
|
|
||||||
|
列出块设备的分区表
|
||||||
|
|
||||||
|
### 使用dmesg命令来识别出USB设备名
|
||||||
|
|
||||||
|
dmesg是一个重要的用于打印或者控制内核环形缓冲区的命令。环形缓冲区是一种数据结构,它存放着内核操作数据的信息。
|
||||||
|
|
||||||
|
运行如下的命令来查看内核操作信息,它同时也会打印出USB设备的信息:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ dmesg
|
||||||
|
```
|
||||||
|
[
|
||||||
|
![dmesg - Prints USB Device Name](http://www.tecmint.com/wp-content/uploads/2016/10/dmesg-shows-kernel-information.png)
|
||||||
|
][11]
|
||||||
|
|
||||||
|
dmesg – 打印USB设备名
|
||||||
|
|
||||||
|
以上就是这篇文章中提及到的所有命令,我们在命令行下使用不同的方法来找出USB设备名。你也可以跟大家分享下实现这个目的的其它方法,或者如果你对这篇文章有什么想法也可以在下面跟大家交流下。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: http://www.tecmint.com/find-usb-device-name-in-linux
|
||||||
|
|
||||||
|
作者:[Aaron Kili ][a]
|
||||||
|
译者:[rusking](https://github.com/rusking)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]:http://www.tecmint.com/author/aaronkili/
|
||||||
|
[1]:http://www.tecmint.com/tag/linux-tricks/
|
||||||
|
[2]:http://www.tecmint.com/mount-filesystem-in-linux/
|
||||||
|
[3]:http://www.tecmint.com/wp-content/uploads/2016/10/List-All-Linux-Device-Names.png
|
||||||
|
[4]:http://www.tecmint.com/how-to-check-disk-space-in-linux/
|
||||||
|
[5]:http://www.tecmint.com/wp-content/uploads/2016/10/Find-USB-Device-Name.png
|
||||||
|
[6]:http://www.tecmint.com/commands-to-collect-system-and-hardware-information-in-linux/
|
||||||
|
[7]:http://www.tecmint.com/wp-content/uploads/2016/10/List-Linux-Block-Devices.png
|
||||||
|
[8]:http://www.tecmint.com/fdisk-commands-to-manage-linux-disk-partitions/
|
||||||
|
[9]:http://www.tecmint.com/wp-content/uploads/2016/10/List-Partition-Table.png
|
||||||
|
[10]:http://www.tecmint.com/dmesg-commands/
|
||||||
|
[11]:http://www.tecmint.com/wp-content/uploads/2016/10/dmesg-shows-kernel-information.png
|
Loading…
Reference in New Issue
Block a user