Recent Posts
- (02/24) Calling an Element from a Helper TAGS:CakephpWeb ProgrammingUsageTutorialExample
- (10/14) Forcing A Single Join in CakePHP PaginationTAGS:CakephpCakephp 13DatabaseErrorsHabtmMysqlMssqlWeb ProgrammingUsage
- (08/11) Inserting NOW() into MySQL Using CakePHPTAGS:CakephpDatabaseMysqlMssqlWeb ProgrammingUsage
- (08/07) Best PaginateCount for CakePHP - with Group By SupportTAGS:CakephpBehaviorsWeb ProgrammingUsageDatabaseExampleMysqlHabtmHack
- (04/03) CakePHP Error Messages Not Showing on FormTAGS:CakephpCakephp 13Web ProgrammingErrorsUsage
- (02/06) Sorting Paginated Results Using a Related Model Field in CakePHPTAGS:CakephpWeb ProgrammingUsageExample
- (11/02) Changing CakePHP's Model useTable on the FlyTAGS:CakephpWeb ProgrammingMysqlDatabaseExampleTutorial
- (10/18) The Funniest Error Message Ever - Thank You EclipseTAGS:EclipseWeb ProgrammingErrorsHumorWindowsUsageSoftwarePhpCakephp
Subscribe to my feed
MainelyDesign.com Blog
Common SSH Commands (An Idiot's Guide)
Posted on 09/25/2010 at 09:25 am by Kevin Wentworth
Viewed 2,437 times | 2 comments
Well, I never thought I would be saying this, but I'm starting to love using SSH to manage certain elements of my server. Now that I'm using ssh bash to make some updates to my server, I find myself constantly hunting for the simple commands. I'm going to put all the commands I need below, because I'm the idiot and it's my guide.
Changing Directories / Navigating
cd /dir/to/go/to/
cd .. (up a directory; that's a space, then dot-dot)
cd - (back to last directory, space-hyphen)
dir (list directories in current directory)
Delete/Remove a Directory
rm -r -f <directory> (-r = recursive; -f = without any confirmation prompts)
List File/Folder Attributes
ls -laF (-laF = no clue; that's why I'm making this guide)
Change Ownership
chown -R <user> <directory> (-R = recursive, capital R)
Change Group
chgrp -R <group> <directory> (-R = recursive)
Targeting Current Directory
. = current directory
Change Current User (create shell)
su <username> (will stay in same directory, just switch user)
su - <username> (- = will go to home directory of the user)
exit - to exit the current su/shell
Making a SymLink
ln -s /home/source/dir/ /home/target/sym/link/dir
Removing a Symlink (see)
rm /home/target/sym/link/dir (no trailing slash)
unlink /home/target/sym/link/dir (no trialing slash)
From the above list, you can see how advanced my knowledge of bash is...
Cheers,
-Kevin Wentworth
Tags for Common SSH Commands (An Idiot's Guide)
Web Server Admin | Usage | Example

Posted by Matt
on 23/10/10
Very basic. You might want to pick up an Oreilly book or two.