Skip to main content

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.

"cp" - alternate copy command

Never use "cp -rr" if you need to maintain soft links (symlinks) as links; -r copies the actual file the link points to. Use -a instead.

"cp" - alternate copy command