Latest Updates: os x

  • How to Stop .DS_Store From Being Created on Network Drives (OS X)

    05:36 on January 4, 2010 | 3 Comments Tweet This! | Digg This!
    Tags: os x,

    .DS_Store files can make even the tidiest network shares look horrible to none-OS X users.

    Whenever an OS X machine accesses a network share, it creates a .DS_Store file for it’s own use (on SMB/CIFS, AFP, NFS, and WebDAV servers).  These files are invisible to the OS X user, but will show up to anyone else using other operating systems such as Windows or a Linux distribution.

    Turning them off is easy though, by running the following command:

    defaults write com.apple.desktopservices DSDontWriteNetworkStores true

    You will need to either log off or restart the computer for the changes to take affect.

    For more information, please see the official knowledge base article here:  http://support.apple.com/kb/HT1629

     
  • Mounting SSH and/or FTP Servers in Finder (OS X)

    00:27 on January 3, 2010 | 1 Comments Tweet This! | Digg This!
    Tags: os x,

    With more and more people using remote servers nowadays, usually via SSH or FTP, the challenge of uploading data/editing data is ever growing.

    I personally SSH to my remote servers and use command line tools such as Vim to edit files.  But you may not have SSH access, and only FTP access – in that case, you’d need to edit the files locally, open another application and upload them manually.

    There are times though, when I like to use desktop applications such as Textmate to edit files remotely on various servers via SSH – but, of course, Finder and the applications on my computer wouldn’t be able to see them – until now!

    Macfusion solves this problem.  Along with MacFUSE, it allows you to “mount” the remote server space you have as a normal network drive.  What this means is, if you go to File -> Open in any application locally, you’ll see the remote drive.  You’ll be able to see, copy, move, and even create new files directly on the remote server – infact, it acts exactly like any other drive would.

    I’d highly recommend you take a look – both tools are free to download (the GUI and the underlying daemons) and I’ll guarantee once you start mounting your remote server space, you’ll wonder how you ever managed with older methods!

    Macfusion: http://www.macfusionapp.org/about.html
    MacFUSE:  http://code.google.com/p/macfuse/

    You’ll need both of the above.

     
  • Using SCP Aliases to Upload Files Quicker (OS X, BASH)

    15:32 on August 2, 2009 | 0 Comments Tweet This! | Digg This!
    Tags: , , os x,

    If like me, you have a particular path on a server you always upload files to, via SCP, then you’ll probably want a better way than typing the full path into the scp command everytime you upload a file!

    This command has been tested on OS X, but there’s no reason it wouldn’t work on a Linux or BSD machine running BASH, either.

    I personally have a “stuff” directory on a web server, where I put random files to share with people, but it’s path is pretty long on the remote web server, and I have to type it everytime I run the scp command – not quick or great!

    There’s a way around it, though, by using bash aliases.  By editing the ~/.bash_profile file (.bash_profile in your home directory), we can alias common scp commands.

    So, for example, if I have a file called screenshot.png and I want it to go to /var/www/stuff on a remote server called server.example.com, I would normally have to do:

    scp screenshot.png server.example.com:/var/www/stuff

    This can get boring quick, especially if you do it a lot during the day.  We can, however, alias this to a command called whatever we want (take care though not to use an alias of an already existing command/application!)  So, if I wanted just a command of “scpstuff” I could do that by editing the ~/.bash_profile file by adding:

    alias scpstuff="scp $1 server.example.com:/var/www/stuff"

    You will need to close the terminal and reopen it for the alias to take affect, after saving the file.

    What this will do is, take the first argument to “scpstuff” (represented by $1), and run the command with it in, so, to upload something to the /var/www/stuff directory on server.example.com, all I would need to do now is:

    scpstuff screenshot.png

    You will be prompted for your SSH password as normal (unless you use SSH keys) but it’s much quicker than typing the whole line out each time!

    Of course, you could set up lots of aliases, such as scpstuff, scpimage, scpscreenshot – anything you do a lot would be useful!