25/01/201202 showing your mobile number?
25/01/201202 showing mobile number
23/01/2012Sage pay dummy credit cards
20/01/2012Megaupload gone
11/01/2012The last 5% of a website build
10/01/2012Andriod with TinyMCE
08/01/2012Is firefox getting old?
08/01/2012Google Chrome making us better coders?
07/01/2012Understanding the Top Command
05/01/2012Useful Unix Commands
30/03/2011How to create your own Virtual Diary
30/06/2009Free Back Link Checker
24/06/2009Free Keyword Density Tool
23/06/2009Unix Time Stamp Converter
21/01/2008New Design for Good Site Bad Site22
00/00/0000Keyword Position
Welcome to another goodsitebadsite blog! If there is one thing that we seem to do alot in our job, it is the constant questioning of ourselves on those simply unix/linux commands that we use regularly. Below are the commands that we use the most, which we hope will be of us to everyone!
Moving Files:
to move a file from on place or another (also can be used to rename a file) use:
mv orginal_name_and_path new_name_and_path
For example:
mv setup.php setup2.php
Copying Files:
Copying files uses the same syntax as moving a file above but uses the cp command:
cp file_to_copy destination_of_new_file
for example:
cp setup.php /var/www/vhosts/example.com/httpdocs/setup.php
The above example is presuming that you are in the actual directory where setup.php exists
Removing a file
Always be careful when on the server and removing a file!
rm filename
for example
rm setup.php
listing files
To list the files of the directory that you are in, you can use the ls command. The ls command has quite a few useful options:
ls
ls on its own will give you a simple list of files
ls -l
This can be really handy if you want to have more information show, such as file size
Changing directories
To find your way around you use the cd command
cd directory you wish
for example
cd /var/www/vhosts/example.com/httpdocs
or if you want to go back a level (presuming we are in /var/www/vhosts/example.com/httpdocs use:
cd ..
this would then take you to /var/www/vhosts/example.com
Finding where you are
If you have got yourself lost and not sure what directory you are in, use pwd
pwd
This will return your current path
Finding files
if you have mislaid a file, or need to a file, you can use the locate command
locate file_name
for example
locate setup.php