Skip to content

Instantly share code, notes, and snippets.

@dangh
Created January 20, 2017 19:33
Show Gist options
  • Save dangh/de66e47ebc08fd0b62e1f47389eff03d to your computer and use it in GitHub Desktop.
Save dangh/de66e47ebc08fd0b62e1f47389eff03d to your computer and use it in GitHub Desktop.
start OSX built-in TFTP server in fish shell
function tftpd
switch $argv
case start
sudo rm -rf /private/tftpboot
sudo ln -s (pwd) /private/tftpboot
sudo launchctl load -w /System/Library/LaunchDaemons/tftp.plist
case stop
sudo launchctl unload -w /System/Library/LaunchDaemons/tftp.plist
end
end
@dangh
Copy link
Author

dangh commented Jan 20, 2017

mkdir -p ~/.config/fish/functions
curl -o ~/.config/fish/functions/tftpd.fish https://gist.githubusercontent.com/dangh/de66e47ebc08fd0b62e1f47389eff03d/raw/tftpd.fish
tftpd start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment