Useful Putty Commands

Navigate directories:
cd ..
cd [FOLDERPATH]/
Change owner of a file/folder:
chown [USERNAME] [FILENAME]
chown [USERNAME] -R [FOLDERNAME]
Move a file:
mv [FILENAME].ext [NEWDIRECTORY]/

Move a directory:
mv [FOLDERNAME]/ [NEWDIRECTORY]/
Change File/Folder Permissions:
chmod 755 [filename].ext

Change Permission for all files/folder in current folder:
chmod -R 755
Compress folder to download:
tar cvfz [OUTPUTNAME].tar.gz [FOLDERNAME]/

Move a file:
cp [FILENAME].ext [NEWDIRECTORY]/

Move a directory:
cp -R [FOLDERNAME]/ [NEWDIRECTORY]/
To login into your database:
mysql -u [USERNAME] -p –database=[DATABASENAME]

Update an info:
UPDATE [tablename] SET [optionvalue]=’xxxxx’ WHERE [optionID]=”[matchingcolumn];
Things to keep in mind:
If moving or deleting things do not work, don’t forget to use “sudo”
Type
ls
to see list of files and folder in directory.

Leave a comment

Your email address will not be published. Required fields are marked *

nineteen + twenty =