read start _ < <(du -bcm /filename)是啥意思

Ramulet 2018-02-03 12:08:56
无意中看到kali官网有这么一个命令(网址是https://docs.kali.org/downloading/kali-linux-live-usb-persistence):



First, begin by imaging the latest Kali Linux ISO (currently 2016.2) to your USB drive as described in this article. We’re going to assume that the two partitions created by the imaging are /dev/sdb1 and /dev/sdb2. This can be verified with the command “fdisk -l“.
Create and format an additional partition on the USB drive.
First, let’s create the new partition in the empty space above our Kali Live partitions.

end=7gb
read start _ < <(du -bcm kali-linux-2016.2-amd64.iso | tail -1); echo $start
parted /dev/sdb mkpart primary $start $end

The parted command may advise you that it can’t use the exact start values you specified; if so, accept the suggested value instead. If advised that the partition isn’t placed at an optimal location, “ignore” it. When parted completes, the new partition should have been created at /dev/sdb3; again, this can be verified with the command “fdisk -l“.

请教下知道的大神,这句命令 read start _ < <(du -bcm kali-linux-2016.2-amd64.iso | tail -1) 是如何实现工作的?
...全文
1185 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
帅的被人砍xxx 2018-02-12
  • 打赏
  • 举报
回复
- < < 这样又是什么意思,看不懂 了
ipqtjmqj 2018-02-05
  • 打赏
  • 举报
回复
du -bcm kali-linux-2016.2-amd64.iso用法可用du --help查看 | tail -1是取前面的输出作为输入,从输入中取最后一行 <(命令语句)是执行一个子shell并把输出重定向出来 read 变量名,默认从标准输入中读一行,并根据IFS变量分为内部(internal)字段(field)分隔符(seperator),取字符串到变量中 后面加 < 文件名表示从文件中读一行

19,610

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧