114k views
1 vote
Question 1: What does mount command do? Explain with an example. Question 2: What does fdisk -l command do? Explain with an example. Question 3: What is the difference between commands sha1sum and md5sum? Explain with examples. Question 4: Explain the following commands with an example: dcfldd _______________________________ if= _______________________________ hash=md5 _______________________________ hashconv=after _______________________________ md5log=/root/md5log.txt _____________________________ conv=noerror,sync _______________________________ of= _______________________________

User Arif Usman
by
8.3k points

1 Answer

4 votes

Final answer:

The mount command attaches filesystems to the directory tree, fdisk -l lists disk partitions, sha1sum and md5sum generate hash values to check file integrity, and dcfldd is a forensic version of dd with additional features like on-the-fly hashing.

Step-by-step explanation:

  • Mount Command

The mount command in Linux is used to attach a filesystem to a specified directory in the directory tree, making it accessible to the user. For example, to mount a USB drive to the directory /mnt/usb, you would use the command mount /dev/sdb1 /mnt/usb, assuming /dev/sdb1 is the USB drive identifier.

  • fdisk -l Command

The fdisk -l command lists all available disk partitions on the system. For example, running sudo fdisk -l would provide a detailed partition table for every disk in the system.

  • Differences Between sha1sum and md5sum

The sha1sum and md5sum commands generate hash values to verify the integrity of files. SHA-1 is a more secure hashing algorithm than MD5, with longer hash values. For example, sha1sum example.iso would output the SHA-1 hash of the file, whereas md5sum example.iso would provide the MD5 hash.

  • dcfldd Command Explanation

The dcfldd command is an enhanced version of dd with features useful for forensics and security. An example of its usage could be dcfldd if=/dev/sda hash=md5 hashconv=after md5log=/root/md5log.txt conv=noerror,sync of=/dev/sdb, which creates a bit-for-bit copy of /dev/sda to /dev/sdb, computes the MD5 hash on-the-fly, logs the hash to /root/md5log.txt, and ensures error handling with noerror and data synchronization with sync.

User Jmls
by
7.6k points