Skip to main content

Posts

Showing posts with the label os x

How do I dual-boot Ubuntu 18.04 on a 2011 Mac Mini?

Machine Specs: Mac Mini (Mid 2011), Macmini5,2 Core i7 16 GB RAM (2x8 GB) AMD Radeon HD 6630M 256MB 27-inch Apple Thunderbolt Display 512 GB SSD Running macOS 10.13 High Sierra Caution: This process can result in data loss. If you have personal data on the Mac Mini before starting, back it up first. Twice! (One is none. Two is one. ~ U.S. Navy Seal saying).  Also, mistyping in the parts of this process may brick your Mac Mini. You have been warned. If in doubt, stop working and do research on Google until you understand what's going on in the step. If you find an error, please leave a comment. I will update. Note: This is process I figured out in lieu of booting the Ubuntu install with EFI via refind. Via the refind boot method, I would constantly get: 10:39:07 kernel: Couldn't get size: 0x800000000000000e 10:39:07 kernel: MODSIGN: Couldn't get UEFI db list 10:39:07 kernel: Couldn't get size: 0x800000000000000e The error seems to be relate...

A script to split a file tree into separate trees - one per file extension present in the original tree

Purpose Have you ever had a tree of files from which you only needed certain types of file? For example, I had an iTunes library with some Apple files from another iTunes account combined with a large number of MP3s. I wanted to pull out the tree of MP3s only. You can make such a tree by passing a combination of flags to rsync that make it do an exclusive include. How? Pass the following flags to rsync to make it do an exclusive include for files fitting a certain globbing pattern. Fill in for the variables of course, if you want to use this line alone. In particular, this rsync line: rsync -av --include '*/' --include "*.${extension}" --exclude '*' ${source_directory}/ ${top_directory_of_results}/${extension}/ The script: ========================================================== This tool reads a directory of files that have extensions and then copies each type of file to its own tree. The location of each file in the subtree matches that file...

How do I clean up old large files on Linux?

Many people who have run Linux file servers and ftp servers have at some point wanted to free up some space. One good algorithm to do this efficiently is to remove old data starting with the largest files first. So how to generate such a list? One method is to use a " find -exec du " command: find /path/to/full/file/system -type f -mtime +10 -exec du -sk {} \; | sort -n > /var/tmp/list_of_files_older_than_10_days_sorted_by_size Once you have that list, you can selectively delete files from the bottom of it. Note that the list will likely be exponentially sorted. That is, the bottom 10% of the list will take up a huge chunk of the used storage space.

How to share files from Linux to Mac OS X with NFS

1. Install the NFS server packages on your Linux machine 2. Place the following in you /etc/exports /path/to/share/ ip.of.nfs.client(rw,sync,insecure) For example: /home/user/ 192.168.1.15(rw,sync,insecure) Note the "insecure". 3. Restart your NFS services on the Linux machine 4. On Mac OS X type Command-K in Finder. 5. Type in nfs://ip.of.nfs.server/path/to/share/. For example: nfs://192.168.1.15/home/user/ 6. Click connect. You should get a Finder window into the NFS share. Things to consider if the connection fails: Is your server running a firewall? If so, have you allowed NFS? If your server is running a firewall and does not need to (e.g. it and the client are in a trusted network), you may want to turn it off. Do you have the correct IP address in /etc/exports on the Linux server? This is the IP address of the Mac OS X machine. Note that you can use the hostname as well if you have DNS set up or are using hosts files.