|What's in your Unix bag of tricks? |
As much as I can fit, but for starters...
It might not be as easy as other FTP clients, but it never crashes, it's free, and it's on every Mac OS X machine.
I've found that as a Mac webmaster, the more Unix I know the better.
ssh firstname.lastname@example.org -p
Changing my ssh port has helped fight spammers/hackers/DOS etc.
Definetly the fastest/easiest way to edit any file.
When installing downloadable software on a remote server (or even locally...):
curl -o filename.ext http://example.com/path/to/filename.ext
Forget this 'download-to-workstation-and-upload-to-server' nonsense!
scp /file/on/local/machine /location/on/remote/machine
secure copy is great when I need to move a few files and I know exactly where they are going.
Here's a fun one. When you're out of town and missing that special someone, paste this into the Terminal (all on one line):
|say -v Agnes "For Pete's sake, are you reading that web master world again? Oh for crying out loud, make yourself useful for once and take out that fricken trash it stinks." |
grep -rl "string I want to find" *
whereis php (and for other binaries)
Those were in my console history :)
Oh, my fav is:
I'm a Linux man, but it's the same right?
Just encountered this: Have a 25+MB file that's a long list, and I needed to strip out the duplicates.
sort original_filemane ¦ uniq > new_filename
uniq only finds duplicates on adjacent lines, hence the need to sort first.
|I'm a Linux man, but it's the same right? |
"Similar but different" would be a better description. AFAIK OS X adopted FreeBSD's userland utilities, so some things are subtly not quite the same (netstat is the only thing that comes to mind right now though).
(Linux on the desktop and webservers, OpenBSD on the firewall and OS X on the laptop = recipe for command-line confusion ;-).
top -o vsize
Heres my list I could not live with out!
Wanna watch whos at your site in real time?
tail -f /var/log/httpd/access_log
wanna see your errors in real time?
tail -f /var/log/httpd/error_log
Having trouble with your mysql tables?
mysqlcheck -u root -p --all-databases --analyze --optimize
Im making a site right now about commands and such related to os x server commands if your interested in the site message me and ill give you the address.