Now that I’ve got a smartphone I’d like to actually be able to use it to edit websites. I’ve gotten to where I can SSH my main machine (which is running Ubuntu) at home as well as my webhost’s servers to edit my websites. Access to SSH is ubiquitous among most webhost providers’ servers.
iSSH for the iPhone Rules: It Has Alt, Ctrl, Del, and Arrow Keys (Important!)
I’ve got a cool SSH client on my iphone called iSSH — only a few bucks — that will also connect up to my desktop if I want to do something that requires a little more than the bash commandline. (Which, by the way, you can check what shell you’re using at any time by typing echo $bash).
Though, to be honest, using vnc for a view of the desktop tends to be slow and barebones. It’s way faster if I can get a good grasp of doing the things I need to do from the actual commandline since it boils down to only transmitting text. iSSH has the benefit of supporting important characters like the alt key, among other things, which is very useful for certain unix commandline — particularly the text editors, which are primarily used for direct editing of files such as css stylesheets, pdf, html, etc.
Logging Into a Linux Box with Dynamic DNS
My home IP address changes occasionally — though, not often. To make it so I could consistently find my home “box” I signed up for a DynDNS.org address which will allow you to login with yourownaddress.dyndns.org, which an app on your box can update automatically periodically ensuring that if your IP address changes you’re still available through the DynDNS address.
File & Directory Lists: Assessing Folder Size, Listing Files
Recently, when logging into my PC I realized I needed to liberate some space on my dropbox. I had to determine which folders. Ordinarily to list files I use this command: ls -alhF. This shows most of the information you’d ordinarily need, and includes options to make folders stand-out (-F), show normal file sizes (-h), show hidden files beginning with a . such as .htaccess (-a), and -L for longer listing.
However, even this well adapted version of ls I find that when working with the commandline in the unusual circumstance that I need to liberate space rapidly from a dropbox folder with many sub-folders, for example, ls does not show the file size of folders *beneath the current folder*, but instead only of the immediate files within the current directory. In order to see the space amount of space all of the directories take up counting all sub-folders and files it is necessary to use the following: du -h -c .
In this case, the . in du -h -c represents the current directory.
Commandline Text Editors: Vi, Vim, Nano
Though, I’ve been told by friends I really should learn vi or vim if I want to speed things up, I mostly just use nano. I’ll have to memorize some of the whiz-bang tricks for using vi to make it worth the switch. (See the vi cheatsheat) For the time being, however, nano is very intuitive, with it’s on-screen directions for basic commands. Vim, by the way, is just a sort of improved version of vi. For the most part the fundamentals are the same with either one.
Git is Awesome
One cool thing about using an iphone and SSH to edit pages, is almost every webhost, as well as my desktop PC has git on it. Which means that even as I edit the web page, whether I’m logged into my desktop or another server I can keep track of my changes, and if I make an accident which I may be a little more prone to use typing on the iphone’s capacitative screen, I can always roll back safely to the previous version.
This is really important because it eliminates the possibility of disaster and really makes doing editing from a smartphone a more viable option.
Other useful links: