Hacker Newsnew | past | comments | ask | show | jobs | submit | ernst_mulder's commentslogin

Beware if you want to copy files with extended attributes, ACLs or resource forks to another Mac.

The short syntax used to be "rsync -Eva"

Since openrsync this is now "rsync -va ---extended-attributes"

I will need to go through a bunch of scripts now I'm afraid. Bye bye Eva.


Same kind of problem with an old HP LaserJet 1300 we still use. It began by it occasionally picking up multiple sheets of paper and jamming. It gradually got worse until the printer wasn't usable anymore.

The issue turned out to be the solenoid for the pick-up mechanism. When activated it should cause the pick-up mechanism to turn once. The solenoid once apparently had a small rubber pad to reduce noise. This had turned into goo and the solenoid would stick causing the mechanism to turn multiple times.

Fixed by removing the left-over goo and a piece of tape. Ten minute fix.


As a maintainer of a calculator collection website which is guaranteed AI-free I asked ChatGPT to draw me a logo for a guaranteed AI-free website, then realising I could not use that logo on an AI-free website :-)


I don't want to dox you, since it's easy to get from your museum to your personal webpage. Would you be kind enough to submit your site to HN, or post here for other people? It's a really amazing bit of old web!


Thank you very much for this detailed article.

I never realised this is how floating point division can be implemented. Actually funny how I didn't realise that multiple integer division steps are required to implement floating point division :-)

In hindsight one could wonder why the unused parts of the lookup table were not filled with 2 and -2 in the first place.


Many thanks OP for the couple of commands I did not yet know. Especially `pbcopy` and `pbpaste`, those are going to be very useful.

Here are a couple of commands I use quite a lot.

lsof -p <PID>

Lists the open files of the process with process ID <PID>. Very very useful.

fs_usage -w <PID>

This one is mentioned by others here as well, but followed by a <PID> it shows all filesystem activity of the given process. Useful if you want to know where specific settings of an application are stored.

top -u

Obvious what this does, standard command. Sorted by CPU usage.

<some command> | open -ft

Opens the <some command>'s result in your default text editor.

system_profiler

Very useful for finding out stuff. E.g. system_profiler SPNVMeDataType SPSerialATADataType | grep 'BSD Name: disk[0-9]$' | sed 's/.\* //' Gives the device name of all your system's SATA and NVMe SSD's.

sysctl -a

Another way to find out stuff. E.g. sysctl -a | grep hw.memsize Shows the amount of physical memory in your system.

tmutil

Very powerful for managing Time Machine as mentioned by others here. Also useful for other stuff. There is a lot of File I/O on my system due to running at least five VM's all the time. This produces big snapshots. Every now and then my system hung up due to running out of space because of these snapshots. Now I'm running my own "snapshottaper" daemon running every ten minutes keeping only the last 4 snapshots and deleting the rest, using "tmutil listlocalsnapshotdates" and "tmutil deletelocalsnapshots" which eliminates that issue (which is a bug imho).

And some of my often used (tcsh) aliases:

proc, aliased to 'ps -axww -o pid,user,command | grep -v "grep -i" | grep -i \!\* | sed "s/^\ *//"'

Filter the list of running processes for a specific string, e.g. use "proc adobe" to find all running processes by Adobe. I use this a lot.

spf, aliased to 'dig \!* txt | grep "v=spf"'

Useful for finding SPF records for a given domain, e.g. 'spf apple.com'.

mx, aliased to 'dig \!\* mx | grep -v "^;..*" | grep "IN\WMX"'

Same, but for MX records (I maintain e-mail servers, hence these two).

est, aliased to 'netstat -n | grep -i proto ; netstat -n | grep ESTABLISHED | grep -v 127.0.0.1'

List all currently open network connections.

listen, aliased to 'sudo echo -n; sudo lsof -i4 -n -P | grep "\*:" | sed "s/IPv4.*://" | grep LISTEN | sort -n --key=5 | sed "s/ (LISTEN)//" | awk BEGIN\ \{print\ \"COMMAND\ \ \ \ \ \ \ \ \ \ \ PID\ \ \ \ \ \ \ USER\ \ \ \ \ \ \ PORT\"\}\ \{printf\ \"%-10s\ %10s\ %10s\ %10s\\n\"\,\ \$1\,\ \$2\,\ \$3\,\ \$5\}'

List all processes currently listening on network ports.

router, aliased to 'netstat -rn -f inet | grep default | grep -v link | awk \{print\ \$2\} | head -1'

List the currently used internet router.

(I hope all escape characters and such survive posting this, please excuse me if they don't, also my default command shell is tcsh for historical reasons, it was my default shell in the early 1990's. Yes my shell scripts are all #!/bin/sh)

Other than these, I really like using AppleScript and shell scripts together. Using AppleScript I now have my own GUI tools for making disk images using drag-and-drop, compacting sparse images, performing default settings for new installations, switching between virtual machines whilst hiding others, etc.


Some time ago I dreamt that I was in an alien space ship for some reason. Still carrying my phone and laptop bag. They were a friendly lot and asked whether or not I would like to charge my laptop. Do you have 220V sockets I asked. They didn't know what that was. So I needed measurements and definitions. An approximate meter, an approximate second. Coulomb was difficult. I woke up and downloaded Wikipedia the next day. Deleted it again later for lack of harddisk space...

But next time this happens I will have an USB stick with all the necessary knowledge. The definitions for voltage, current and frequency should however be printed out in case my laptop battery charge is insufficient for accessing the USB stick.


Usually alien abductions thoughts revolve around an intrusive test to see if you have a chess cheat device inserted, or should that be upserted?


Film director Wim Wenders's "Until the end of the world" from 1991 shows a very interesting future with "video fax" and "video phones". And instead of CD's it shows credit-card-form audio storage. The way this film depicts how video phones might work was actually convincing. Still, right now when someone tries to FaceTime me, I decline...


Before I read that it is actually orbiting our star I briefly thought "maybe they had an accident with a nuclear waste dump on the far side of their planet"


Same here. Turns out to be a staggering number of files actually, much larger than the number of flies.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: