i do not use the typical laptop or desktop setup to muck around on the linux cli, to use text editors [micro, my babe], or futz around in image and video editors. i rely mainly on my android phones rocking termux and other various apps.
one of the pains in my keister lately, as far as getting the files to my site host's server goes, has been in the quite convoluted steps i take to do a quite simple task. these are mainly, mostly in fact, done as a direct result of a) i am scared of
sftp via a cli still, and b) im self teaching on every aspect of my growth so far. the process is roughly:
committhe updates via
rsynccopy the files from the termux app storage into android storage proper
/data/data/com.termux/... to the usual
- use TotalCommander as visual ftp client and send those badboys up to the server.
Now the point of this post.
ln and hard links. I was reading some articles and the die.net MAN pages on
ln tonight and it finally sank in, what makes a hard link so incredibly valuable. especially in arenas like where i dwell.
a file name simply points the OS to the data bits and bytes that are written on the disk that make up what i conceptualize as a
.mp3file. if the file name is erased (this happens when i delete the file) only the pointer to the specific bits is removed. the bits an bytes remain and are written over, etc etc. there is nothing that says that multiple file names cannot point to and access the same range of bytes from the OS. that multiple file pointers cant reference the same data.
i can, through termux, access my
/storage/emulated/0/ file system and create hard links, via
ln, to the html, liquid, css, etc files i edit and manipulate in termux and be able to upload them from android os. takes out constant
mv shenanigans. makes my workflow leaner, tighter, more tiger like.