ln is such an important utility, endlessly useful, and really not hard to use or understand at all, except for when you haven’t used it in a while and check the manpage for its syntax then that’s when shit hits the fan.
It is confusing at best. In my case, the fact that wasn’t straightforward from the beginning, even after “getting it”, the experience of the confusion is what I remember instead of the syntax, and there’s always a lingering uncertainty that kicks in.
TARGET is immediately easy to understand, so is LINK_NAME, and if it was left there it would’ve made a world of difference but then DIRECTORY is introduced, introducing ambiguity with it. Granted, if you keep reading a little further you may catch the explanation, but realistically, how many stop to read the description and don’t go straight to skim the options? And when the five second research fails: it’s a web search.
This may seem obvious to many, it’s fine, it’s not for you. It’s for those scatterbrains, the ADHDs and OCPDs like me that interpret an non-definitive answer as open, where the non-denied what ifs that create more questions. It can be frustrating.
I’m not going to teach you how to use ln but rather a simple mnemonic that might come in handy: treat it like cp.
ln is like copying files, only without copying their data. cp‘s syntax, is among the most memorable in the CLI because it’s one of the first commands you learn along with mv which also has the same syntax ordering: SOURCE → DESTINATION. Works for every case.
Hard linking directories is complicated. In syntax: instead of having to define if a directory plays source, destination or object, just maybe think that without the s there’s no plural, so you [hard] link individual files with(out) it:
While thin, elegant, graceful lines are lines as often sought consistently in design, don’t you sometimes wish you’d had a very girthy one to work with?
There’s only so much grace you can have when you’re working in spastic scenarios, you need chunko, you crave for chunko.
Translation
When you’re using remote HID peripherals*, such as in VNC or Synergy, the adjustments your HID driver makes to have smooth ac/deceleration curves so content scrolls smoothly and pointers aren’t jerky is not available remotely.
Two-finger scrolling is nearly impossible, specially in laggy and cramped 3m/10ft UIs, such as TV screens where at 60″, you only have a 720p-equivalent screen real estate, realistically.
The better solution would be to do this system-wide, but in cases such as in the screenshot above where Firefox was running on Linux, the procedure to accomplish this varies by desktop environment, of which there might be endless options in just a single distro. And distros are abundant.
*: HID = Human Interface Device. e.g; game controllers, mice, keyboards, motion sensors, etc.
Only works on VMFS-type datastores. If your VMs are on NFS you have to Storage vMotion them to a VMFS datastore, vMotion itself may be able to thin the disk. Consolidate disks, delete all snapshots, consolidate again if necessary. Once you have decluttered your disks, proceed, otherwise I promise you will regret it. Shut down heavy disk-hitter VMs before doing this, not during (unless you unplug their virtual power cord AKA turn off). And avoid creating heavy network traffic during the process. It’s not that long, fortunately.
Prepare the VMs
Get the SysInternals tools on Windows to zero out your disks.
On Windows you can do it without installation or even downloading anything, just mount their WebDAVS repo directly on file explorer, you’ll hav¨-´ e to open TCP:443 for the host live.sysinternals.com where you need to connect.
⇧-right-click on any free space among the files listed and select to open a PowerShell window. On older Windows it says a Command Prompt window if you haven’t change or doesn’t have the taskbar setting Replace Command Prompt with Windows PowerShell in the menu when I right-click the start button or press Windows key+X, ain’t that a mouthful.
Run for each local disk .\sdelete -z C:, replacing C: for the next in the list, of course.
On Linux it will vary by the million format options you have. VMware cites the example dd if=/dev/zero of=/mounted-volume/zeroes && rm -f /mounted-volume/zeroes. I’m not an expert so I’ll stay away from it.
What I will say is that personally I’d never try it on disk formats that double as volume managers, e.g; ZFS, Btrfs. Try other ways of rescuing whatever you need to rescue. Linux doesn’t treat you like a thief, collecting identifiers of whatever is identifiable to prevent you from moving your OS like Microsoft is with Windows–or you know… another less logical reason. It’s relatively trivial to rsync sensitive data and system files on Linux. Taking away the giant disk from the VM and mounting it alongside a new smaller disk on another Linux VM should let you cp/dd/rsync/etc the data.
SSH or open you ESXi host’s console (on the yellow console press either ⌥F1 or ⌥F2 to show it) then navigate to your VM. Start by listing the contents of /vmfs/volumes/. Identify your datastore, and navigate to your VM’s directory. If you renamed the VM in the past without using Storage vMotion, it’s very likely to have its old name. vSAN data is completely different to what shown on vCenter, it’s best not to mess with vSAN directly, if you must insist, take the VM to a regular VMFS datastore using vCenter to queue the job.
Create a temporary ls alias to sort through things quicker, i.e; alias ls="ls -lAphFX".
As you can see above, there are a ton of files. You need to work on the non -flat.vmdk files only.
The final command you have to run is…wait ! I almost forgot: you must shutdown your VM, preferably properly, and unregister it from vSphere. You can do this on vCenter or ESXi, just watch out if vCenter doesn’t add it back.
The finally run the command vmkfstools -K disk_name.vmdk. In my case that would be vmdkfstools -K 0B001F-VC.vmdk. Now, for some reason vSphere is very unstable when I ssh in. You’ll never know if it’ll show a broken pipe-something error within minutes or within slightly more minutes. Speaking of…
So, I found a workaround for this: add before the same command, setsid, e.g; setsid vmdkfstools -K 0B001F-VC.vmdk. This executes the command on a separate process entirely instead of a child process from your SSH session, that will take down all child processes with it if it gets terminated. It also means that the command will exit immediately. Though occasionally it prints stuff on screen.
That’s it. You can exit your session now, grepps‘s output to see if your task has finished. If you need to work on several disks, you can script it, for instance:
One of the following commands, the second, creates a script in-line in the directory where you execute it, it makes the script executable and it immediately runs it. The script finds all .vmdk-ending files excluding those ending in -flat.vmdk still using the current directory as the working directory and one at a time “punches out” the zeroed space in the disks.
The other script, the first one, does almost the same thing as the second explained except that in only prints out the files it would’ve used. Both command write out a script named thinner, meaning one overwrites the over.
The other difference is that the working one runs in the background
They need no adjustments, just copy and paste.
Testing script
cat << "_thinner" > thinner
#!/bin/sh
vdiskfindr() {
find . -type f -name '*.vmdk' -not -name '*-flat.vmdk' -exec echo {} \;
}
for vdisk in $(vdiskfindr); do
echo "$vdisk"
done
_thinner
chmod +x thinner
./thinner
Job-performing script
cat << "_thinner" > thinner
#!/bin/sh
vdiskfindr() {
find . -type f -name '*.vmdk' -not -name '*-flat.vmdk' -exec echo {} \;
}
for vdisk in $(vdiskfindr); do
vmksfstools -K "$vdisk"
done
_thinner
chmod +x thinner
setsid ./thinner
Take a little break, register your VM and power it on
As soon as it start running, I recommend you run ps | grep vmkfstools and study a little the output. The terminal might interrupt what your typing if the status changes, ignore it and continue as if I hadn’t happened, type in the command without looking at the screen if it’s confusing you to spell. Use only one finger, firmly pressing each key all the way down then releasing it quickly. I sound and looks stupid, but it helps specially when you’re sleep-deprived which is a very common theme when you’re troubleshooting.
Are you sleepy?
Maybe take a little disco nap, half an hour makes a huge difference in concentration, play some music, smoke some meth, I don’t know. Don’t let yourself get bored because it leads to data loss.
In regular Linux, this command would normally find itself in the list, but ESXi is weird. If you’re doing a batch of vdisks, the PID will keep changing, don’t worry about, all I wanted you to do it to learn to be able to tell the difference when the job is running and when it’s not.
And, that’s it. All you have to do is keep on checking from time to time.
It takes a while but not as much as zeroing out storage. Once it’s finished register again the VM, the quickest browsing the datastores on ESXi then after you find the VM’s location right-click the VMX file and select Register VM. This bypasses the whole assistant you’d get otherwise and your previous settings are preserved except for a few like automatic power on. You machine should be now available on the VMs view, powered off.
Hopefully this wasn’t too confusing. If you need help, don’t hesitate to ask. Just contact me however you can, I’m sure you’ll figure out how. I can’t write my addresses because of bots, sorry.
A few months back I while customizing my systems, among the list of things I could mess with was the boot manager I use on macOS (and later on the first PC I build), rEFInd.
It turns out I had to redesign all icons I needed on my own to match the look I was going for, and if I was going to do that, it just made sense to do the whole theme so anybody else could use it they wished. The whole set up process would go to waste otherwise.
Late in the project I realized I had to design an icon for rEFInd itself, with my color scheme or rather lack thereof since it’s a grayscale/silverish theme and had to convey what rEFInd does or say something about it at least a little bit more than the its official logo ’cause, picture the following scenario:
A friend of yours is helping you with stuff, you’re busy at another desk. They turn on the machine and rEFInd on an internal disk comes up, you need to tell them to load rEFInd on a flash drive but just by looking at the icons they’d have no idea which is it. The rEFInd logo says not much about it.
In this hypothetical your friend also has to be a raging moron to be incapable of figuring out arrow keys, but you get the point.
My project had already gotten out of hand at that point, not to mention that after finishing the logo for rEFInd and exporting what I thought was the finished theme, it came out horribly misaligned so I still have to correct that. With the rEFInd logo, my goals were (1.) to make it convey something about itself and (2.) being the what whole kickstarts operative systems, itself had to look kickass over all the other peasants logos it passed control over. Just kidding, some distros actually have some very cool logos.
Unlike all the OSes which have guidelines and whatnot, on this one I was starting from scratch, so I had free reign which I guess would be an artist’s dream, but I’m not an artist, or a designer for that matter, I just stumble onto this and sometimes I manage to learn how to operate them, like Serif’s Affinity Designer. All that decision making without a structure in place is terrifying to me. But I started drawing a few objects and sort of got in the zone.
I wanted to draw something like “micro”chips, the big chunky ones that were on old motherboards before they started painting them all black1 just for the fact that those are like the floppy disk equivalent on the save button; most people have never seen them but they know what they are.
*: Coincidentally something that got lost on me since I switch to macOS in the Tiger days, I had little business left on the insides of computers from that moment on, except for servers which to this day are still very green, just not environmentally.
I’ve lost count of how many people many people I’ve met who think “the Windows” is on those chips, not on the spinning where they know their data is. I don’t know how so many people manage to get to the same conclusion, but y’know, now that NVMe disks are not only mainstream, but they are mounted right in the motherboard where the rest of the chips are, those that held on being wrong got so far back that being right caught up with them poking them in the ass that they could just ride it and get to the forefront of things. I’m picturing an arrow that’s reaching it’s own tail along the perimeter of a circle, if you’ve know idea what I’m talking about. To be honest, I’ve no idea either.
Twinsies!
Where was I?… Oh yeah, chips holding code. These I think would signify both where an OS would be in addition to the EFI code. Next is how to depict that this thing I’m describing searches for things. A magnifying glass was too easy, it occupies too much space which is wasted by the handle. An option would be those use by photographers that are like a little whiskey glass turned upside down, but that’s way too much complex for me to draw. I’m not skilled enough I don’t think.
So I took another approach, why search if the word on its name is find. They are obviously not the same thing. Finding means you’ve already succeeded searching, and it would be reasonable to assume that if you found you’re good at it, and I circled back to the badass concept I wanted with a crosshair on top of a chip, it didn’t look cool though so I made it isometric and the whole concept of location and GPS got mixed in somewhere along the process and now I wanted to draw something like the little pinpoint you get on map apps but the map would be some random chips, in the end the pinpoint thingy got morphed into a tornado/hurricane-looking crosshair over a some random chips, like some of search and destroy bot in sci-fi movies. The hurricane has long trails of 1s and 0s. They don’t have meaning though, I just smashed them in the keyboard and copied them endlessly.
In the screenshot above, one of the trail tracks is selected, this go all around from the center all the way out, multiple conical gradients are applied to make the illusion of movement. In my head, this would be deadly-fast, binary gusts but circling around but the crosshair would turn very very slow because it’s so massive. That makes sense, right? No? Just me?
Ohgawd, I think I’m my imaginary dumbass friend.
I wanted to spell out the word rEFInd in little chiplets. It is not possible in a square artboard without making it too small so I made it look like pieces that falling in place, au Tetris, given there’s a fucking hurricane in the scene, it isn’t much of a hard sell. Then I wouldn’t have to spell it, because subconsciously people would naturally do it.
Side note: I’ve noticed I’m sort of good composing lyrics and rhymes and prose (plus spoken languages in general) I’ve only done it as some form of a joke, but maybe it’s related, I’m badly dyslexic, ADHD, OCPD… I was going somewhere with this.
I made a square design to fit in an icon space, but maybe you might remember my design is not in color, there’s only so much you can do in grayscale, when you designe in color, I learned, that detail-related restriction is not only lifted but it kind of turns into a requirement. Those trails for instance, are only in the color version. Additionally I wanted to give back to the author of rEFInd something he could use if he likes my amateurish designs, that is, so I made a wider, more standard, banner-style logo. I had space to fill so I rearranged the falling chips to spell the word without mind tricks, I committed to a falling shit so I still had to incorporate it. In the color version, which again was its own and fourth design, I sort of like motherboard pieces in layers, becoming like a lithographic Tetris-inspired assembly line boot manager. I’m not pleased with the color though, old motherboards were mostly very dark muted green, in my experience, but I’ve seen very shiny ones and recently in much more lighter green. Well, the server ones. Workstation motherboards I believe they’re all black now.
I’m hoping to get nerve to contact the author to tell him about my work and since he’s the only person that could potentially have some use for it, ask him for feedback on the color. Fix it, deliver it, and I can get back to the theme I was supposed to be working on.
Here’s the SVG images, compressed along with the PNGs here above and with @2x “retina” sizes that I forgot to disable in the export setting. In the end I left them go in the compressed file because… because. There’s no need to retina anything, resolution was set at 400dpi before the first artboard was even created.
I’m still doing small tweaks here and the on the original Serif Affinity Designer file, so I didn’t add it just yet but I can just add it later to the same zip later.
If you’re interested in the file, maybe contributing to it, I’d be happy to send it to you, if you happen to be Mr. Roderick Smith, I’d be honored to send them as they are/they’ll be. Though, I’d really like to deliver something a little more tailored to your taste so feel free to suggest different colors, objects to add/eliminate/move. I’ll send you the current files, then the corrected set. It’d really mean a lot, or just don’t, SVGs are basically copies. If I run into them on some website that’s all the validation I’ll need. Wow–that came out depressing, it’s not though, I’m pumped up.
Either Mr. Smith, or another(the makes it sound like I am one) a graphic designer, just contact me—I can’t leave my details around because this thing runs on WordPress and y’know…I’m sure you’ll find it though.