Linux/Hard Drive Management: Difference between revisions

From Dev Wiki
Jump to navigation Jump to search
(Create page)
 
(Add hash section)
Line 14: Line 14:
* <code>rsync -avh <input_location> <output_location>
* <code>rsync -avh <input_location> <output_location>
* Note that input/output locations can be a local file path or a network path. If it's a network path, then it takes the format of:
* Note that input/output locations can be a local file path or a network path. If it's a network path, then it takes the format of:
** <username>@<network_location>:<input_or_output_location>
** <code><username>@<network_location>:<input_or_output_location></code>
 
Verifying a download against a hash:
Some large files (particularly iso/img files, such as for an OS install) will have an associated SHA256 string on the website download page.<br>
To verify your download had no errors, you can run the command:
* <code>sha256sum <file_location></code>
 
This should output a string, which you can directly compare to the string on the website. If they match, then the file is valid with no errors.

Revision as of 04:44, 6 November 2019

Various commands and tools to manage disks in Linux.


View currently attached drives/devices:

  • lsblk

GUI Hard Drive Management:

  • Use the gparted program.

Copy Files Locally:

  • dd if=<input_location> of=<output_location> status=progress conv=fsync

Copy Files Over a Network:

  • rsync -avh <input_location> <output_location>
  • Note that input/output locations can be a local file path or a network path. If it's a network path, then it takes the format of:
    • <username>@<network_location>:<input_or_output_location>

Verifying a download against a hash: Some large files (particularly iso/img files, such as for an OS install) will have an associated SHA256 string on the website download page.
To verify your download had no errors, you can run the command:

  • sha256sum <file_location>

This should output a string, which you can directly compare to the string on the website. If they match, then the file is valid with no errors.