A quick reference/cheat sheet about various command line and shell related related things. From shell and bash syntax to common command line tools.
tar -xf $FILE
You can add
-v in there to print the file names as well.
If you're not dealing with stdin, then it should auto-detect the compression type.
To find from current directory:
locate "$PWD*/<FILE GLOB>"
find <OPTIONS> <PATH>
-type: Specifies file type. Typically use
-name: Name of the file.
Finds difference between two files/directories
--brief: Report only the files that differ.
- Ending dir name in
/ copies contents and without copies directory.
-a: archive. A combination of a bunch of other useful options such as recursive.
-P: Combination of
--partial which allows resumption of interrupted sync, and
--progress which shows progress.
-n: Dry run
--delete: Delete files from destination that aren't in source directory.
Lists devices. Useful for finding USB drives, other external storage, etc.
Those devices are usually in /dev/
udisksctl mount -b DEVICE_NAME
udisksctl unmount -b DEVICE_NAME
DEVICE_NAME is a device from lsblk.
Automatically mounts a device.