====== find, but don't try to find where you obviously can't ======
[[https://unix.stackexchange.com/questions/87634/exclude-paths-that-make-find-complain-about-permissions/87850#87850|from]]
find . -type d ! \( -readable -executable \) -prune -o -type f -not -path './.*/*' -
or, install [[https://github.com/sharkdp/fd|fd]] :) ''fd 'scratch\.md /''
====== fun customizations ======
/etc/motd is what gets displayed when you log in over ssh. there's a thing called [[https://github.com/stefanhaustein/TerminalImageViewer|tiv]] that will help you make nice login images.
====== ssh ======
===== password login =====
- find ''/etc/ssh/sshd_config'', set ''PasswordAuthentication'' to ''yes''
- ''sudo service ssh restart''
===== pubkey login =====
- generate keypair. You'll have this done if you set up for git. (note to self grab that article from github)
- touch /home/serveruser/.ssh/authorized_keys; chmod 600 authorized_keys
- cat clientid.pub >> /home/serveruser/.ssh/authorized_keys
====== logs for systemd unit ======
sudo journalctl -u gitea | tail -n100
====== bootable USB from iso ======
people act like dd is so fucking difficult, it's not. (probably need root for most of these)
- double check you have the right one: ''lsblk''. today we're saying our target drive is /dev/sdb. be aware it will let you try, even if there isn't enough room on the disk.
- drive mounted? unmount it: ''umount /dev/sdb*''
- make a filesystem. ''mkfs.vfat /dev/sdb''. mine complained that there were already partitions on it, but let me proceed if I used ''-I''.
- ''sudo dd if=name-of-iso.iso of=/dev/sdb status=progress''
====== non-bootable USB ======
i have a disk on /dev/sdc that I'm formatting for 1 big file system.
- ''lsblk'' - find the one you want
- ''sudo fdisk /dev/sdc''
- ''o'' - give it a DOS label.
- ''n'' - make a __n__ew partition
- ''p'' - __p__rimary
- [enter] - default start block
- [enter] - default end block
- ''w'' - __w__rite changes.
- ''sudo mkfs.ntfs -L MyStick /dev/sdc1'' - make an __ntfs__ filesystem, tell the device its __L__abel is __MyStick__.
====== surface linux ======
i bet if I'm looking up the bootable flash drive commands I want this: https://github.com/linux-surface/linux-surface/wiki/Installation-and-Setup#Debian--Ubuntu
====== unix epoch to time ======
date -d @1621607851 +'%Y-%m-%d-%H-%M-%S'