Enter the good life

Hermansons in the Q

Browsing Posts in Tech

Sending long commands, or starting long downloads to multiple machines via ARD is fine unless you need to use ARD for something else, or if you want to close your machine prior to it being done.  Using a Task Server is an option if you are willing to pay for another copy of the app, [...]

bsd humor

No comments

unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep

$ diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk0 1: EFI 209.7 MB disk0s1 2: Apple_HFS Server HD 999.9 GB disk0s2 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *2.0 TB disk1 1: EFI 209.7 MB disk1s1 2: Apple_HFS HD2 2.0 TB disk1s2 /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: [...]

This script either verifies, or creates the 3 main shared directories we use for local, school-based servers. The student_data directory has directories within it to house different student directories within their graduation year. All have permissions set so staff has read access to all student folders, and students have read access to only the upper [...]

We have many Open Directory servers at many locations.  Each has it’s own group setup as well as it’s own place to save students’ work.  Manually creating these folder locations, managing permissions on these folders, and setting up the groups can take a long time.  I just learned about the command awk, and thought I [...]

For names without spaces mkdir ‘cat file’ For names with spaces awk ‘{system(“mkdir “” $0 “”")}’ file Change names in a file with spaces to an underscore sed ‘s/\_/\ /’ file > file1

Change IP

No comments

ifconfig bge0 inet 10.0.1.201

For dumping to a mounted NFS server, mount the nfs server, then run the following command: /sbin/dump -0Laf /mnt/backup/usr /usr The 0 flag is for the full backup dump level The L flag is for backing up a live file system The a flag is to make the backup a non-interactive backup The f flag [...]

Install Apache22: # cd /usr/ports/www/apache22 # make install clean Add apache22_enable=”YES” to /etc/rc.conf # echo apache22_enable=”YES” >> /etc/rc.conf The apache22 conf file is located at: /usr/local/etc/apache22/httpd.conf Enable VHosts: Uncomment the VHosts line towards the bottom of httpd.conf Edit the /usr/local/etc/apache22/extras/httpd-vhosts.conf file Add VHosts based on the examples in the file According to http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html, add the [...]

networksetup is the key. This appears from Leopard (10.5.x) on. Prior to that, we would use the tried and true ifconfig. The man pages of networksetup are actually well laid out and informational. A few to remember: $ networksetup -listallnetworkservices A plaintext view of network services $ networksetup -listallhardwareports A list of network services, ports, [...]