linux basic ------ dd 和 cp 的区别

问:
看了一些关于dd和cp的命令,但是我始终无法明白dd和cp之间有什么不同?
不是都可以看成是备份的作用么?还有什么区别呢?
答:
1、dd是对块进行操作的,cp是对文件操作的。

2、比如有两块硬盘,要将第一块硬盘内的数据复制到第二块硬盘上

dd if=/dev/hda of=/dev/hdc bs=4 count=1024

bs表示每次复制的块大小

count表示要复制的次数

这样第二块硬盘的数据布局和第一块是完全一样的(扇区级别,每块扇区上的数据和第一块硬盘都是一样的)

cp只是将第一个硬盘的数据复制到第二块硬盘上,由于系统写硬盘不是顺序写的,哪里有足够的空间就放到哪,所以第二块硬盘相同的扇区号上的数据和第一块硬盘有可能是不一样的。


dd:块级别拷贝
cp:文件目录级别拷贝
 
    举个例子,如图所示。可以看出,dd将原始数据(raw data)按照数据源的格式原封不动的拷贝到目的地;cp将文件和目录拷贝到目的地后按照目的地的格式排列新数据。注意:对于不能以文件或目录格式呈现的数据(如引导启动块的数据),cp无能为力

转载于:https://www.cnblogs.com/god-of-death/p/10274074.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Key Features Practical recipes to conduct effective penetration testing using the powerful Kali Linux Leverage tools like Metasploit, wireshark, nmap and many more to detect vulnerabilities with ease Confidently perform networking and application attacks using task oriented recipes. Book Description With the current rate of hacking, it is very important to pentest your environment in order to ensure advance level security. This book will be packed with practical recipes that will quickly get you started with Kali Linux (version 2016.2) as per your requirements and move on to core functionalities. This book will start with the installation and configuration of Kali Linux to perform your tests. You will learn how to plan attack strategies and perform web application exploitation using Burp, XSSer, Jboss-autopwn, and so on. You will also learn how to perform network exploitation using Hamster, Sparta and Wireshark. Next, you will perform wireless and password attacks by using tools such as Patator, John the Ripper and cew. Moving on you will cover malware analysis and Forensis along with hardware hacking. Lastly you will learn how to create an optimum quality pentest report! By the end of this book, you will learn how to conduct advanced penetration testing in the form of crisp and task oriented recipes. What you will learn Install and setup Kali Linux on multiple platforms Customize Kali Linux to your individual needs Exploit vulnerabilities you've found with Metasploit Carry out web application and network exploitation Perform wireless and password attacks Decode messages from the Radio Learn how to write your pentest report Table of Contents Chapter 1. Kali – An Introduction Chapter 2. Gathering Intel And Planning Attack Strategies Chapter 3. Vulnerability Assessment Chapter 4. Web App Exploitation – Beyond Owasp Top 10 Chapter 5. Network Exploitation On Current Exploitation Chapter 6. Wireless Attacks – Getting Past Aircrack-Ng Chapter 7. Password Attacks – The Fault In Their Stars Chapter 8. Have Shell Now What? Chapter 9. Buffer Overflows Chapter 10. Playing With Software-Defined Radios Chapter 11. Kali In Your Pocket – Nethunters And Raspberries Chapter 12. Writing Reports

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值