Useful Commands
"sudo pacman -Sy"
"sudo pacman -S git fakeroot binutils"
"cd ~/Downloads"
"git clone https://aur.archlinux.org/realvnc-vnc-viewer.git"
"cd realvnc-vnc-viewer"
"sudo pacman -U realvnc-vnc-viewer-*-x86_64.pkg.tar.zst"
"su" - elevate prompt so you don't need sudo
"pwd" - show current directory
"sudo fdisk -l" - ?
"mhwd -li" - show ??
"pamac install gvfs-smb" - install samba
"rsync -avr /path/to/dir1 /path/to/destination" - how to copy with rsync
"rsync -avP /path/to/dir1/ /path/to/dir2/ /path/to/destination/" - copy two folders into one with rsync
-a (archive): Preserves symbolic links, permissions, ownership, and timestamps. Identical to -dR --preserve=all, preserving recursive structure, symlinks, and attributes.
-P: Combines --partial (keeps partially transferred files if the sync is interrupted) and --progress (shows a progress bar during the transfer).
-v (Verbose): Increases the information provided during the transfer, listing each file as it is processed.
-z (Compress): Compresses data during the transfer to reduce network usage, which is ideal for slow connections.
-h (Human-Readable): Displays file sizes and transfer speeds in a more readable format (e.g., KB, MB, GB) instead of raw bytes.
-n or --dry-run: Performs a trial run without making any actual changes. This is critical for testing your command before execution
If you're moving large files and you want the option to resume a cancelled or failed rsync operation from the exact point that rsync stopped, you need to use the --append or --append-verify switch on the next attempt.
--delete: Deletes files at the destination that no longer exist at the source. Use this to create an exact mirror, but always use --dry-run first to avoid accidental data loss.
-u (Update): Skips any files that exist on the destination and have a modified time newer than the source file.
-e <command>: Specifies the remote shell to use, most commonly ssh. For example: rsync -avz -e ssh source/ user@remote:/dest/.
--exclude='PATTERN': Excludes files or directories matching a specific pattern from the transfer.
-c (Checksum): Forces rsync to compare files based on checksums rather than the default "quick check" of file size and modification time.
-H (Hard Links): Preserves hard links in the transfer (not included in -a).
-A and -X: Preserve ACLs (Access Control Lists) and Extended Attributes, respectively.
"cp" - alternate copy command
Never use "cp -r" if you need to maintain soft links (symlinks) as links; -r copies the actual file the link points to. Use -a instead.