Category: Shell Script

  • Synology NAS and those pesky @eaDir folders

    If you’ve enabled MediaServer and/or PhotoStation on your Synology NAS you might have noticed a bunch of “@eaDir” folders inside your data folders. You will not normally see this under samba or appletalk connections. I noticed it since I was trying to rsync from synology to a old qnap nas I have lying around. Although […]

  • Basic APT commands

    Okay, now for a bit of CLI goodness. Here is a quick list of basic apt commands.  Debian and most derivatives (Ubuntu) use these for package maintenance.#searchapt-cache search packagename #package infoapt-cache show packagename #cleansudo apt-get cleansudo apt-get autoclean #old packages #checkapt-get check #get source codeapt-get source packagename #get depapt-get build-dep packagename #update/install/remove/upgradesudo apt-get updatesudo apt-get […]

  • OSX Webmaster special: Shared webserver, bad umask settings, group permissions and filenames with spaces…

    Okay so this all started with our users not being able to share files on our webserver. We use SSH only for upload/download and interactive access (ie: no ftp). Through trial and error we found out that the default umask (under OSX Server) for sftp uploaded files are 0033 (ie: rwxr–r–) and directories are 0022 […]

  • Couple of cool remote ssh commands for your UNIX arsenal

    Here is a easy way to copy an entire directory tree from one Unix machine to another, while retaining the permisssions and ownership, using ssh as the middle man. Assuming that you want to copy everything under source_directory to destination_directory on another machine here is the command you would issue on the source machine (first […]

  • Couple of quick shell tips

    Okay these are bash goodies, so they’ll work in any environment. If you’re in a situation where you’re switching between two different directory paths over and over again, here is a quick tipcd – Another little annoyance that I’ve gotten around is when you want to edit a system file and you type in the […]

  • Generic Scripts to add Google Analytics code to HTML pages

    Before I start, this tip is Unix friendly (not just OSX), but requires you to know what shell scripts are and how you create/run them. Additionally you should be familiar with the workings of the “find” command in Unix. I had lots of trouble getting the Google Analytics code onto my gallery site. The problem […]