SlideShare a Scribd company logo
Linux-Fu  for PHP Developers
About Me Lorna Mitchell Developer at Ibuildings European Rep for  http://phpwomen.org Personal blog  http://lornajane.net Compulsive keyboard user (for accessibility reasons)
Linux-Fu
Outline basic commands first utilities access permissions useful utilities
Linux Philosophy
Basic Commands
pwd Print Working Directory - shows you where you are lorna@taygete:~/Documents$  pwd /home/lorna/Documents
ls list files -a for all including hidden files lorna@taygete:~/Documents$   ls   - a .  jam_labels.pdf  netball ..  libmemcache_install_notes.txt  tek_instructions.txt advent_web_services.rtf  linux - fu_geekup.txt  using_the_community.txt girlgeek_post2.txt  memcache.odt jam_labels.odt  memcache.rtf
ls -l for long list  ls -la  lorna@taygete:~/Documents$   ls   - la total   136 drwxr - xr - x   3   lorna lorna   4096 2009 - 04 - 24 09 : 37   . drwxr - xr - x   66   lorna lorna   4096 2009 - 04 - 23 17 : 33   .. - rw - r -- r --   1   lorna lorna   16790 2008 - 12 - 04 22 : 54   advent_web_services.rtf - rw - r -- r --   1   lorna lorna   1263 2008 - 12 - 10 12 : 16   girlgeek_post2.txt - rw - r -- r --   1   lorna lorna   10700 2008 - 12 - 20 16 : 08   jam_labels.odt - rw - rw - rw -   1   lorna lorna   6747 2008 - 12 - 25 21 : 35   jam_labels.pdf - rw - r -- r --   1   lorna lorna   316 2009 - 03 - 19 19 : 28   libmemcache_install_notes.txt - rw - r -- r --   1   lorna lorna   189 2009 - 02 - 08 16 : 02   linux - fu_geekup.txt - rw - r -- r --   1   lorna lorna   33275 2008 - 12 - 04 11 : 37   memcache.odt - rw - r - xr --   1   lorna users   28205 2008 - 12 - 04 11 : 37   memcache.rtf drwxr - xr - x   2   lorna lorna   4096 2009 - 04 - 24 09 : 37   netball - rw - r -- r --   1   lorna lorna   940 2008 - 12 - 09 09 : 43   tek_instructions.txt - rw - r -- r --   1   lorna lorna   461 2008 - 11 - 28 22 : 49   using_the_community.txt
ls -t for list by time -r for sort in reverse order  lorna@taygete:~/Documents$   ls   - lrt total   128 - rw - r -- r --   1   lorna lorna   461 2008 - 11 - 28 22 : 49   using_the_community.txt - rw - r -- r --   1   lorna lorna   33275 2008 - 12 - 04 11 : 37   memcache.odt - rw - r - xr --   1   lorna users   28205 2008 - 12 - 04 11 : 37   memcache.rtf - rw - r -- r --   1   lorna lorna   16790 2008 - 12 - 04 22 : 54   advent_web_services.rtf - rw - r -- r --   1   lorna lorna   940 2008 - 12 - 09 09 : 43   tek_instructions.txt - rw - r -- r --   1   lorna lorna   1263 2008 - 12 - 10 12 : 16   girlgeek_post2.txt - rw - r -- r --   1   lorna lorna   10700 2008 - 12 - 20 16 : 08   jam_labels.odt - rw - rw - rw -   1   lorna lorna   6747 2008 - 12 - 25 21 : 35   jam_labels.pdf - rw - r -- r --   1   lorna lorna   189 2009 - 02 - 08 16 : 02   linux - fu_geekup.txt - rw - r -- r --   1   lorna lorna   316 2009 - 03 - 19 19 : 28   libmemcache_install_notes.txt drwxr - xr - x   2   lorna lorna   4096 2009 - 04 - 24 09 : 37   netball
ls ls <path> to list contents of a different directory
cd Change Directory cd <dir> to enter a subdir cd .. to go up a level lorna@taygete:~$  cd /etc lorna@taygete:/etc$  cd cron.d lorna@taygete:/etc/cron.d$ lorna@taygete:/etc/cron.d$  cd .. lorna@taygete:/etc$
cd cd ~ to go home cd - to go back to where you came from lorna@taygete:/etc$  cd ~ lorna@taygete:~$  pwd /home/lorna lorna@taygete:~$ lorna@taygete:~$  cd - lorna@taygete:/etc$  pwd /etc
First Utilities
touch creates an empty file with current timestamp no feedback (this is *nix) lorna@taygete:~/talks/temp$   touch   unicorns.txt lorna@taygete:~/talks/temp$   ls   - lA total   0 - rw - r -- r --   1   lorna lorna   0 2009 - 04 - 24 09 : 50   unicorns.txt
cat outputs a file to your terminal cat <file> lorna@taygete:~/talks$   cat   orange.txt Oranges are not the only fruit ( name of a book ) lorna@taygete:~/talks$
less/more pager for viewing longer content more <file> less <file> use less – it really is more in this case
stdin/stdout stdin  &quot;standard in&quot; – input to a program, usually command line arguments stdout  &quot;standard out&quot; – output, usually to your screen
stdin/stdout photo credit: ppdigital
pipe &quot;chaining&quot; operator output of one program pushed along the pipe to the input of the next
pipe cat orange.txt index.php | more lorna@taygete:~/talks$  cat   orange.txt index.php   |   more Oranges are not the only fruit ( name of a book ) < ?php class Response   { public   function   output () { header ( 'Content-type: text/xml' ); echo   '<?xml version=&quot;1.0&quot;?>' ; echo   &quot;  &quot; ; } } -- More --
file redirection operators a.k.a. &quot;pointy brackets&quot; < and > > directs stdout to the named file >> appends to the file rather than truncating it before outputting
file redirection operators lorna@taygete:~/talks$  mysqldump   -- compact   - u root   - p   test Enter password : SET @saved_cs_client   =   @@character_set_client ; SET character_set_client   =   utf8 ; CREATE TABLE   `users`   ( `user_id`  int ( 11 )   NOT NULL auto_increment , `name`  varchar ( 20 )   default NULL , PRIMARY KEY   ( `user_id` ) )   ENGINE = MyISAM AUTO_INCREMENT = 2   DEFAULT CHARSET = latin1 ; SET character_set_client   =   @saved_cs_client ; INSERT INTO   `users`  VALUES   ( 1 , 'lornajane' );
file redirection operators lorna@taygete:~/talks$  mysqldump   -- compact   - u root   - p   test   >   test .sql Enter password : [email_address] :~/talks$ lorna@taygete:~/talks$  mysqldump  -- compact  - u root  - p  test   |   gzip   >   test .sql.gz Enter password : [email_address] :~/talks$
file redirection operators < directs the contents of the file to stdin lorna@taygete:~/talks$  mysql   - u root   - p   test   <   test .sql Enter password : lorna@taygete:~/talks$
Access
telnet not now used much for server access useful for direct port access telnet <host> <port>
ssh Secure SHell prompts for password, you arrive at command prompt
scp secure copy copies files over a one-off ssh connection if you have ssh access, this is available scp <source> <target> source and/or target can be remote paths
scp [email_address] :~$  scp cherries.jpg lorna@rivendell.local:fruit.jpg lorna@rivendell.local's password: cherries.jpg  100%  162KB 162.3KB/s  00:00
scp lorna@taygete:~$  scp cherries.jpg lorna@rivendell.local: lorna@rivendell.local's password: cherries.jpg  100%  162KB 162.3KB/s  00:00
scp lorna@taygete:~$  scp -r talks lorna@rivendell.local:talks/ lorna@rivendell.local's password: thing.jpg  100%  162KB 162.3KB/s  00:00 credits.txt  100%  68  0.1KB/s  00:00 index.php  100%  167  0.2KB/s  00:00 cherries.jpg  100%  162KB 162.3KB/s  00:00 orange.txt  100%  44  0.0KB/s  00:00 misc.php  100%  59  0.1KB/s  00:00 long_file.txt  100% 2383  2.3KB/s  00:00 what.jpg  100%  162KB 162.3KB/s  00:00
sftp SSH File Transfer Protocol similar to FTP many FTP clients handle SFTP more secure easy to set up, part of SSH server
Permissions
Permissions 10 characters of information see in the output of ls lorna@taygete:~/Documents$   ls   - la total   136 drwxr - xr - x   3   lorna lorna   4096 2009 - 04 - 24 09 : 37   . drwxr - xr - x   66   lorna lorna   4096 2009 - 04 - 23 17 : 33   .. - rw - r -- r --   1   lorna lorna   16790 2008 - 12 - 04 22 : 54   advent_web_services.rtf - rw - r -- r --   1   lorna lorna   1263 2008 - 12 - 10 12 : 16   girlgeek_post2.txt - rw - r -- r --   1   lorna lorna   10700 2008 - 12 - 20 16 : 08   jam_labels.odt - rw - rw - rw -   1   lorna lorna   6747 2008 - 12 - 25 21 : 35   jam_labels.pdf - rw - r -- r --   1   lorna lorna   316 2009 - 03 - 19 19 : 28   libmemcache_install_notes.txt - rw - r -- r --   1   lorna lorna   189 2009 - 02 - 08 16 : 02   linux - fu_geekup.txt - rw - r -- r --   1   lorna lorna   33275 2008 - 12 - 04 11 : 37   memcache.odt - rw - r - xr --   1   lorna users   28205 2008 - 12 - 04 11 : 37   memcache.rtf drwxr - xr - x   2   lorna lorna   4096 2009 - 04 - 24 09 : 37   netball - rw - r -- r --   1   lorna lorna   940 2008 - 12 - 09 09 : 43   tek_instructions.txt - rw - r -- r --   1   lorna lorna   461 2008 - 11 - 28 22 : 49   using_the_community.txt
Permissions
Permissions
chmod change permissions chmod <class><operator><mode> <file> class: u,g,o,a (user, group, other, all) operator: +, -, = mode: r,w,x, or any combination
chmod add execute permission for group lorna@taygete:~/Documents$   chmod   g + rx memcache.rtf lorna@taygete:~/Documents$   ls   - lA total   132 - rw - r -- r --   1   lorna lorna   16790 2008 - 12 - 04 22 : 54   advent_web_services.rtf lrwxrwxrwx   1   lorna lorna   22 2009 - 03 - 16 12 : 04   downloads   -> / home / lorna / downloads / - rw - r -- r --   1   lorna lorna   1263 2008 - 12 - 10 12 : 16   girlgeek_post2.txt - rw - r -- r --   1   lorna lorna   10700 2008 - 12 - 20 16 : 08   jam_labels.odt - rw - rw - rw -   1   lorna lorna   6747 2008 - 12 - 25 21 : 35   jam_labels.pdf - rw - r -- r --   1   lorna lorna   189 2009 - 02 - 08 16 : 02   linux - fu_geekup.txt - rw - r -- r --   1   lorna lorna   33275 2008 - 12 - 04 11 : 37   memcache.odt - rw - r - x r --   1   lorna lorna   28205 2008 - 12 - 04 11 : 37   memcache.rtf - rw - r -- r --   1   lorna lorna   9939 2009 - 03 - 09 15 : 23   netball_cancellation.pdf - rw - r -- r --   1   lorna lorna   940 2008 - 12 - 09 09 : 43   tek_instructions.txt - rw - r -- r --   1   lorna lorna   461 2008 - 11 - 28 22 : 49   using_the_community.txt
chown chown lorna:users memcache.rtf lorna@taygete:~/Documents$  chown lorna : users memcache.rtf lorna@taygete:~/Documents$   ls   - lA total   132 - rw - r -- r --   1   lorna lorna   16790 2008 - 12 - 04 22 : 54   advent_web_services.rtf lrwxrwxrwx   1   lorna lorna   22 2009 - 03 - 16 12 : 04   downloads   -> / home / lorna / downloads / - rw - r -- r --   1   lorna lorna   1263 2008 - 12 - 10 12 : 16   girlgeek_post2.txt - rw - r -- r --   1   lorna lorna   10700 2008 - 12 - 20 16 : 08   jam_labels.odt - rw - rw - rw -   1   lorna lorna   6747 2008 - 12 - 25 21 : 35   jam_labels.pdf - rw - r -- r --   1   lorna lorna   189 2009 - 02 - 08 16 : 02   linux - fu_geekup.txt - rw - r -- r --   1   lorna lorna   33275 2008 - 12 - 04 11 : 37   memcache.odt - rw - r - xr --   1   lorna  users   28205 2008 - 12 - 04 11 : 37   memcache.rtf - rw - r -- r --   1   lorna lorna   9939 2009 - 03 - 09 15 : 23   netball_cancellation.pdf - rw - r -- r --   1   lorna lorna   940 2008 - 12 - 09 09 : 43   tek_instructions.txt - rw - r -- r --   1   lorna lorna   461 2008 - 11 - 28 22 : 49   using_the_community.txt
root superuser don't log in as root log in, then su (substitute user) may need root privileges, to perform certain actions
sudo avoids using root account gives root for a single command
sudo http://xkcd.com/149/
Useful Utilities
cURL tool for talking to the world over http lorna@taygete: ~$ curl http://localhost Example Home Page Array ( )
cURL < ?php echo   &quot;Example Home Page  &quot; ; print_r ( $_POST ); ? >
cURL checking actual browser response headers/content curl -I http://localhost (that's a capital i) lorna@taygete:~$  curl -I http://localhost HTTP/1.1 200 OK Date: Mon, 16 Mar 2009 12:35:10 GMT Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch X-Powered-By: PHP/5.2.6-2ubuntu4.1 Vary: Accept-Encoding Content-Type: text/html
cURL posting variables lorna@taygete:~$  curl -X POST http://localhost -d fruit=apple  -d user=lornajane Example Home Page Array ( [fruit] => apple [user] => lornajane )
wget web downloader lorna@taygete:~$  wget http :// www.splitbrain.org / _media / projects / dokuwiki / dokuwiki - 2009 - 02 - 14 .tgz -- 2009 - 04 - 24 10 : 40 : 16 --   http :// www.splitbrain.org / _media / projects / dokuwiki / dokuwiki - 2009 - 02 - 14 .tgz Resolving www.splitbrain.org...   78.46.97.149 Connecting to www.splitbrain.org | 78.46.97.149 |: 80 ... connected. HTTP request sent ,   awaiting response...   200   OK Length :   1770454   ( 1.7 M ) [ application / octet - stream ] Saving to :   `dokuwiki-2009-02-14.tgz' 100%[=================================>] 1,770,454  1.39M/s  in 1.2s 2009-04-24 10:40:18 (1.39 MB/s)  - ` dokuwiki - 2009 - 02 - 14 .tgz ' saved [1770454/1770454]
wget to mirror a site wget -m http://lornajane.net to resume large downloads wget -c http://localhost
grep finding things (Global/Regular Expression/Print) grep [options] [pattern] [target]
grep discover functions lorna@rivendell:~/svndir/snapshot/lib$   grep   function  Service.class.php *   This class holds the functionality of the out - ward facing part of *   This   function   is called to add a new request to the queue. public   function   requestShot ( $accountID ,   $requestURL ,   $returnURL   =   NULL ,   $height = 75 ,   $width = 100 ) { function   getShotStatus ( $accountID ,   $transactionID ) { function   getAccountStatus ( $accountID ) { function   getShotList ( $accountID ,   $status = NULL ) { function   getShot ( $accountID ,   $transactionID ) {
grep look for class names in source tree lorna@rivendell:~/svndir/phergie$   grep   - R   '^class '   * |   grep   - v .svn   |   more Phergie / Event / Response.php : class Phergie_Event_Response Phergie / Event / Request.php : class Phergie_Event_Request Phergie / Driver / Streams.php : class Phergie_Driver_Streams extends Phergie_Driver_A bstract Phergie / Plugin / Drink.php : class Phergie_Plugin_Drink extends Phergie_Plugin_Abstr act_Command Phergie / Plugin / ModuleList.php : class Phergie_Plugin_ModuleList extends Phergie_Pl ugin_Abstract_Command Phergie / Plugin / Debug.php : class Phergie_Plugin_Debug extends Phergie_Plugin_Abstr act_Command Phergie / Plugin / Twitter / twitter.class.php : class Twitter   { Phergie / Plugin / Twitter / laconica.class.php : class Twitter_Laconica extends Twitter {
grep Recursive and case insensitive lorna@rivendell:~/svndir/snapshot$   grep   - Ri  'select  from'   * lib / Model / Miscinfo.class.php :   $row   =   $dbh -> read ( 'select * from misc_info where info_key = ' . $dbh -> quote ( $key ) . ' limit 1' ); lib / Model / Transaction.class.php :   $row   =   $dbh -> read ( 'select * from transactions where transaction_id = ' . $dbh -> quote ( $transaction_id ) . ' limit 1' ); lib / Model / Transaction.class.php :   $row   =   $dbh -> read ( 'select * from transactions where transaction_id = ' . $dbh -> quote ( $transaction_id ) . ' and account_id = ' . $dbh -> quote ( $account_id ) . ' limit 1' ); lib / Model / Transaction.class.php :   $sql   =   'select * from transactions where account_id = ' . $dbh -> quote ( $account_id ); lib / Model / Transaction.class.php :   $sql   =   'select * from transactions where status = ' . $dbh -> quote ( $status ); lib / Model / File.class.php :   $row   =   $dbh -> read ( 'select * from files where id = ' . $dbh -> quote ( $id ) . ' limit 1' ); lib / Model / Account.class.php :   $row   =   $dbh -> read ( 'select * from accounts where account_id = ' . $dbh -> quote ( $account_id ) . ' limit 1' ); lib / DBL / Database.class.php : *   $rows   =   $db -> read ( 'select * from aTable' );
find powerful &quot;grep&quot; using file metadata rather than content can search by name find . -name .htaccess also by modified time, by size, etc ...
diff shows differences between files, doesn't show you what is the same lorna@taygete:~/talks$   diff   misc.php.old misc.php 3 c3 <   $link   =   mysql_connect ( 'localhost' , 'app_user' , 'yorkshirepud' ); --- >   $link   =   mysql_connect ( 'localhost' , 'lorna' , 'candyfloss' );
diff Unified diff format lorna@taygete:~/talks$   diff   - u misc.php.old misc.php ---   misc.php.old   2009 - 04 - 24 10 : 56 : 08.000000000   + 0100 +++   misc.php   2009 - 04 - 24 10 : 56 : 51.000000000   + 0100 @@   - 1 , 6   + 1 , 6   @@ < ?php - $link   =   mysql_connect ( 'localhost' , 'app_user' , 'yorkshirepud' ); + $link   =   mysql_connect ( 'localhost' , 'lorna' , 'candyfloss' ); $rhyme   =   &quot;Mary Had A Little Lamb&quot; ; echo $rhyme ;
grep lorna@taygete:~/talks$   diff   - u misc.php.old misc.php   >   patch .txt
patch patch applies diff files
patch lorna@taygete:~/talks$   cat   example.php < ?php $link   =   mysql_connect ( 'localhost' , 'app_user' , 'yorkshirepud' ); ? > lorna@taygete:~/talks$   patch   example.php   <   patch .txt patching   file   example.php lorna@taygete:~/talks$   cat   example.php < ?php $link   =   mysql_connect ( 'localhost' , 'lorna' , 'candyfloss' ); ? > lorna@taygete:~/talks$
tar Tape ARchive for gluing together files, for transfer lorna@taygete:~/talks$   ls cherries.jpg  example.php  long_file.txt  orange.txt  temp   test .sql.gz  what.jpg credits.txt  index.php  misc.php   patch .txt   test .sql  thing.jpg lorna@taygete:~/talks$   tar   - zcf talks.tgz   * lorna@taygete:~/talks$   ls cherries.jpg  example.php  long_file.txt  orange.txt  talks.tgz   test .sql  thing.jpg credits.txt  index.php  misc.php   patch .txt  temp   test .sql.gz  what.jpg lorna@taygete:~/talks$
nano widely available lightweight editor designed as a non-pine equivalent to pico (PIne COmposer) instructions are on-screen
nano
wc word count for counting lines lorna@taygete:~/tek09$   wc   - l linux - fu_content.txt 283   linux - fu_content.txt
tail looking at the end of a file tail -n50 access.log tail -f access.log
screen opening several sessions in one window can detach, log out, come back
screen protects against connection dropping saves logging into the same server many times use .screenrc for config
screen
man man pages are the manual man <command> name synopsis (example arguments) description (all the switches) examples, if you are lucky some tools use &quot;info&quot; instead
man lorna@taygete:~$ man pwd PWD(1)  User Commands  PWD(1) NAME pwd - print name of current/working directory SYNOPSIS pwd [OPTION] DESCRIPTION Print the full filename of the current working directory. --help display this help and exit --version output version information and exit NOTE:  your shell may have its own version of pwd, which usually supersedes the version described here. Please refer to your shellâÀÙs documentation  for  details about the options it supports.
http://joind.in/201
File Locations
log files /var/log /var/log/apache2/access.log
apache config ubuntu, debian /etc/apache2/sites-available redhat /etc/httpd/httpd.conf
/usr/local for stuff that you've installed/added
Processes
ps Process Status shows what is running, pid, user
ps ps ax ps aux use with grep 6761   ?  Ss   0 : 00   / usr / sbin / apache2   - k start 8009   ?  S   0 : 00   / usr / sbin / apache2   - k start 8010   ?  S   0 : 00   / usr / sbin / apache2   - k start 8011   ?  S   0 : 00   / usr / sbin / apache2   - k start 8012   ?  S   0 : 00   / usr / sbin / apache2   - k start 8013   ?  S   0 : 00   / usr / sbin / apache2   - k start 24209   pts / 4   S +   0 : 00   grep   apache
top show current top processes sort by zxc z for colour x for column highlight c to show full command < > to change which column we're sorting by ** q to quit
check apache is running use grep - look for &quot;apache&quot; or &quot;httpd&quot; if not: apache2ctl restart service httpd restart
check mysql is running use grep if not: /etc/init.d/mysql start
Basic Commands
mkdir mkdir make directory lorna@taygete:~/temp$  ls lorna@taygete:~/temp$  mkdir examples lorna@taygete:~/temp$  ls examples
mv and cp move and copy files lorna@taygete:~/temp$  ls cherries.jpg lorna@taygete:~/temp$  mv cherries.jpg oranges.jpg lorna@taygete:~/temp$  ls oranges.jpg lorna@taygete:~/temp$  cp oranges.jpg cherries.jpg lorna@taygete:~/temp$  ls cherries.jpg  oranges.jpg lorna@taygete:~/temp$  cp /etc/php5/cli/php.ini php-cli.ini lorna@taygete:~/temp$  ls cherries.jpg  oranges.jpg  php-cli.ini
rm remove files/directories cherries.jpg  examples  oranges.jpg lorna@taygete:~/temp$  rm oranges.jpg lorna@taygete:~/temp$  touch examples/dewdrops.txt lorna@taygete:~/temp$  rm examples/ rm: cannot remove `examples/': Is a directory lorna@taygete:~/temp$  rmdir examples rmdir: failed to remove `examples': Directory not empty lorna@taygete:~/temp$  rm -rf examples lorna@taygete:~/temp$  ls cherries.jpg
ln link - creates a symlink or alias between directories lorna@taygete:~/Documents$   ln   - s   / home / lorna / downloads temp lorna@taygete:~/Documents$   cd   temp lorna@taygete:~/Documents/temp$   pwd / home / lorna / Documents / temp lorna@taygete:~/Documents/temp$   ls FlickrDownload - 0.4   highlight - 2.7 . tar .gz  libmemcached - 0.26 . tar .gz  ZendFramework - 1.7.6 - minimal FlickrDownload - 0.4 . tar .gz  key.txt  lorna_andean_explorer_large.jpg  ZendFramework - 1.7.6 - minimal. tar .gz highlight - 2.7   libmemcached - 0.26   sun - presenter - screen - linuxintel.oxt lorna@taygete:~/Documents/temp$
cURL great for services flickr example curl -X POST http://api.flickr.com/services/rest/  -d  method=flickr.photos.getRecent  -d api_key=853b05c9... -d per_page=5
cURL < ?xml version = &quot;1.0&quot;  encoding = &quot;utf-8&quot;  ? > < rsp stat = &quot;ok&quot; > < photos page = &quot;1&quot;  pages = &quot;200&quot;  perpage = &quot;5&quot;  total = &quot;1000&quot; > < photo id = &quot;3359907386&quot;  owner = &quot;24259661@N03&quot;  secret = &quot;abcd3374c4&quot;  server = &quot;3593&quot;  farm = &quot;4&quot;  title = &quot;Sandford 2009&quot;  ispublic = &quot;1&quot;  isfriend = &quot;0&quot;  isfamily = &quot;0&quot;   /> < photo id = &quot;3359907364&quot;  owner = &quot;12383345@N06&quot;  secret = &quot;0e5637d188&quot;  server = &quot;3607&quot;  farm = &quot;4&quot;  title = &quot;DSC00159&quot;  ispublic = &quot;1&quot;  isfriend = &quot;0&quot;  isfamily = &quot;0&quot;   /> < photo id = &quot;3359907350&quot;  owner = &quot;84656095@N00&quot;  secret = &quot;3ca7085d12&quot;  server = &quot;3461&quot;  farm = &quot;4&quot;  title = &quot;green&quot;  ispublic = &quot;1&quot;  isfriend = &quot;0&quot;  isfamily = &quot;0&quot;   /> < photo id = &quot;3359088077&quot;  owner = &quot;20633056@N04&quot;  secret = &quot;3d03f2b935&quot;  server = &quot;3654&quot;  farm = &quot;4&quot;  title = &quot;03c&quot;  ispublic = &quot;1&quot;  isfriend = &quot;0&quot;  isfamily = &quot;0&quot;   /> < photo id = &quot;3359088059&quot;  owner = &quot;33581202@N07&quot;  secret = &quot;efa70c71f0&quot;  server = &quot;3607&quot;  farm = &quot;4&quot;  title = &quot;DSCF4768&quot;  ispublic = &quot;1&quot;  isfriend = &quot;0&quot;  isfamily = &quot;0&quot;   /> </ photos > </ rsp >

More Related Content

What's hot

Perl Memory Use 201209
Perl Memory Use 201209Perl Memory Use 201209
Perl Memory Use 201209
Tim Bunce
 
Device-specific Clang Tooling for Embedded Systems
Device-specific Clang Tooling for Embedded SystemsDevice-specific Clang Tooling for Embedded Systems
Device-specific Clang Tooling for Embedded Systems
emBO_Conference
 
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeSCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
Jeff Frost
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commands
Sayed Ahmed
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message Queue
Gleicon Moraes
 
Mercurial for Kittens
Mercurial for KittensMercurial for Kittens
Mercurial for Kittens
nya3jp
 
Hadoop spark performance comparison
Hadoop spark performance comparisonHadoop spark performance comparison
Hadoop spark performance comparison
arunkumar sadhasivam
 
typemap in Perl/XS
typemap in Perl/XS  typemap in Perl/XS
typemap in Perl/XS
charsbar
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
Sasha Goldshtein
 
Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing Landscape
Sasha Goldshtein
 
Centralized + Unified Logging
Centralized + Unified LoggingCentralized + Unified Logging
Centralized + Unified Logging
Gabor Kozma
 
Commit2015 kharchenko - python generators - ext
Commit2015   kharchenko - python generators - extCommit2015   kharchenko - python generators - ext
Commit2015 kharchenko - python generators - ext
Maxym Kharchenko
 
Opendaylight app development
Opendaylight app developmentOpendaylight app development
Opendaylight app development
vjanandr
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queue
Brandon Lamb
 
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your applicationRedis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your application
rjsmelo
 
Perl Memory Use 201207 (OUTDATED, see 201209 )
Perl Memory Use 201207 (OUTDATED, see 201209 )Perl Memory Use 201207 (OUTDATED, see 201209 )
Perl Memory Use 201207 (OUTDATED, see 201209 )
Tim Bunce
 
Nmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumerationNmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumeration
Robert Rowley
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
Aman Gupta
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
Engine Yard
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
Ontico
 

What's hot (20)

Perl Memory Use 201209
Perl Memory Use 201209Perl Memory Use 201209
Perl Memory Use 201209
 
Device-specific Clang Tooling for Embedded Systems
Device-specific Clang Tooling for Embedded SystemsDevice-specific Clang Tooling for Embedded Systems
Device-specific Clang Tooling for Embedded Systems
 
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade DowntimeSCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
SCALE 15x Minimizing PostgreSQL Major Version Upgrade Downtime
 
Linux networking commands
Linux networking commandsLinux networking commands
Linux networking commands
 
RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message Queue
 
Mercurial for Kittens
Mercurial for KittensMercurial for Kittens
Mercurial for Kittens
 
Hadoop spark performance comparison
Hadoop spark performance comparisonHadoop spark performance comparison
Hadoop spark performance comparison
 
typemap in Perl/XS
typemap in Perl/XS  typemap in Perl/XS
typemap in Perl/XS
 
The Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF PrimerThe Next Linux Superpower: eBPF Primer
The Next Linux Superpower: eBPF Primer
 
Modern Linux Tracing Landscape
Modern Linux Tracing LandscapeModern Linux Tracing Landscape
Modern Linux Tracing Landscape
 
Centralized + Unified Logging
Centralized + Unified LoggingCentralized + Unified Logging
Centralized + Unified Logging
 
Commit2015 kharchenko - python generators - ext
Commit2015   kharchenko - python generators - extCommit2015   kharchenko - python generators - ext
Commit2015 kharchenko - python generators - ext
 
Opendaylight app development
Opendaylight app developmentOpendaylight app development
Opendaylight app development
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queue
 
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your applicationRedis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your application
 
Perl Memory Use 201207 (OUTDATED, see 201209 )
Perl Memory Use 201207 (OUTDATED, see 201209 )Perl Memory Use 201207 (OUTDATED, see 201209 )
Perl Memory Use 201207 (OUTDATED, see 201209 )
 
Nmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumerationNmap Scripting Engine and http-enumeration
Nmap Scripting Engine and http-enumeration
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
 

Similar to Linux-Fu for PHP Developers

Lan card installation in su se linux 11
Lan card installation in su se linux 11Lan card installation in su se linux 11
Lan card installation in su se linux 11
bge86
 
Install tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war fileInstall tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war file
Nguyen Cao Hung
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
Acácio Oliveira
 
DNS Configure
DNS Configure DNS Configure
DNS Configure
chacheng oo
 
Licão 06 process text streams with filters
Licão 06 process text streams with filtersLicão 06 process text streams with filters
Licão 06 process text streams with filters
Acácio Oliveira
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
Sagar Kumar
 
Learning the command line
Learning the command lineLearning the command line
Learning the command line
Adrian Cardenas
 
DNS Server Configuration
DNS Server ConfigurationDNS Server Configuration
DNS Server Configuration
chacheng oo
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
Acácio Oliveira
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
Acácio Oliveira
 
First there was the command line
First there was the command lineFirst there was the command line
First there was the command line
Adrian Cardenas
 
Backups
BackupsBackups
Most frequently used unix commands for database administrator
Most frequently used unix commands for database administratorMost frequently used unix commands for database administrator
Most frequently used unix commands for database administrator
Dinesh jaisankar
 
05 standard io_and_pipes
05 standard io_and_pipes05 standard io_and_pipes
05 standard io_and_pipes
Shay Cohen
 
Linux And perl
Linux And perlLinux And perl
Linux And perl
Sagar Kumar
 
Dtalk shell
Dtalk shellDtalk shell
Dtalk shell
Miha Mencin
 
From Drives to URLs
From Drives to URLsFrom Drives to URLs
From Drives to URLs
adil raja
 
Rpm Introduction
Rpm IntroductionRpm Introduction
Rpm Introduction
Shrinivasan T
 
Introduction to UNIX
Introduction to UNIXIntroduction to UNIX
Introduction to UNIX
Simonas Kareiva
 
Linux for CS Majors
Linux for CS MajorsLinux for CS Majors
Linux for CS Majors
worr1244
 

Similar to Linux-Fu for PHP Developers (20)

Lan card installation in su se linux 11
Lan card installation in su se linux 11Lan card installation in su se linux 11
Lan card installation in su se linux 11
 
Install tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war fileInstall tomcat 5.5 in debian os and deploy war file
Install tomcat 5.5 in debian os and deploy war file
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
 
DNS Configure
DNS Configure DNS Configure
DNS Configure
 
Licão 06 process text streams with filters
Licão 06 process text streams with filtersLicão 06 process text streams with filters
Licão 06 process text streams with filters
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
 
Learning the command line
Learning the command lineLearning the command line
Learning the command line
 
DNS Server Configuration
DNS Server ConfigurationDNS Server Configuration
DNS Server Configuration
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
 
101 3.3 perform basic file management
101 3.3 perform basic file management101 3.3 perform basic file management
101 3.3 perform basic file management
 
First there was the command line
First there was the command lineFirst there was the command line
First there was the command line
 
Backups
BackupsBackups
Backups
 
Most frequently used unix commands for database administrator
Most frequently used unix commands for database administratorMost frequently used unix commands for database administrator
Most frequently used unix commands for database administrator
 
05 standard io_and_pipes
05 standard io_and_pipes05 standard io_and_pipes
05 standard io_and_pipes
 
Linux And perl
Linux And perlLinux And perl
Linux And perl
 
Dtalk shell
Dtalk shellDtalk shell
Dtalk shell
 
From Drives to URLs
From Drives to URLsFrom Drives to URLs
From Drives to URLs
 
Rpm Introduction
Rpm IntroductionRpm Introduction
Rpm Introduction
 
Introduction to UNIX
Introduction to UNIXIntroduction to UNIX
Introduction to UNIX
 
Linux for CS Majors
Linux for CS MajorsLinux for CS Majors
Linux for CS Majors
 

More from Lorna Mitchell

OAuth: Trust Issues
OAuth: Trust IssuesOAuth: Trust Issues
OAuth: Trust Issues
Lorna Mitchell
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP Tutorial
Lorna Mitchell
 
Best Practice in API Design
Best Practice in API DesignBest Practice in API Design
Best Practice in API Design
Lorna Mitchell
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
Lorna Mitchell
 
Business 101 for Developers: Time and Money
Business 101 for Developers: Time and MoneyBusiness 101 for Developers: Time and Money
Business 101 for Developers: Time and Money
Lorna Mitchell
 
Things I wish web graduates knew
Things I wish web graduates knewThings I wish web graduates knew
Things I wish web graduates knew
Lorna Mitchell
 
Teach a Man To Fish (phpconpl edition)
Teach a Man To Fish (phpconpl edition)Teach a Man To Fish (phpconpl edition)
Teach a Man To Fish (phpconpl edition)
Lorna Mitchell
 
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
Lorna Mitchell
 
Join In With Joind.In
Join In With Joind.InJoin In With Joind.In
Join In With Joind.In
Lorna Mitchell
 
Tool Up Your LAMP Stack
Tool Up Your LAMP StackTool Up Your LAMP Stack
Tool Up Your LAMP Stack
Lorna Mitchell
 
Going Freelance
Going FreelanceGoing Freelance
Going Freelance
Lorna Mitchell
 
Understanding Distributed Source Control
Understanding Distributed Source ControlUnderstanding Distributed Source Control
Understanding Distributed Source Control
Lorna Mitchell
 
Best Practice in Web Service Design
Best Practice in Web Service DesignBest Practice in Web Service Design
Best Practice in Web Service Design
Lorna Mitchell
 
Coaching Development Teams: Teach A Man To Fish
Coaching Development Teams: Teach A Man To FishCoaching Development Teams: Teach A Man To Fish
Coaching Development Teams: Teach A Man To Fish
Lorna Mitchell
 
Zend Certification Preparation Tutorial
Zend Certification Preparation TutorialZend Certification Preparation Tutorial
Zend Certification Preparation Tutorial
Lorna Mitchell
 
Implementing OAuth with PHP
Implementing OAuth with PHPImplementing OAuth with PHP
Implementing OAuth with PHP
Lorna Mitchell
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
Lorna Mitchell
 
Object Oriented Programming in PHP
Object Oriented Programming in PHPObject Oriented Programming in PHP
Object Oriented Programming in PHP
Lorna Mitchell
 
Example Presentation
Example PresentationExample Presentation
Example Presentation
Lorna Mitchell
 
Could You Telecommute?
Could You Telecommute?Could You Telecommute?
Could You Telecommute?
Lorna Mitchell
 

More from Lorna Mitchell (20)

OAuth: Trust Issues
OAuth: Trust IssuesOAuth: Trust Issues
OAuth: Trust Issues
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP Tutorial
 
Best Practice in API Design
Best Practice in API DesignBest Practice in API Design
Best Practice in API Design
 
Git, GitHub and Open Source
Git, GitHub and Open SourceGit, GitHub and Open Source
Git, GitHub and Open Source
 
Business 101 for Developers: Time and Money
Business 101 for Developers: Time and MoneyBusiness 101 for Developers: Time and Money
Business 101 for Developers: Time and Money
 
Things I wish web graduates knew
Things I wish web graduates knewThings I wish web graduates knew
Things I wish web graduates knew
 
Teach a Man To Fish (phpconpl edition)
Teach a Man To Fish (phpconpl edition)Teach a Man To Fish (phpconpl edition)
Teach a Man To Fish (phpconpl edition)
 
Web services tutorial
Web services tutorialWeb services tutorial
Web services tutorial
 
Join In With Joind.In
Join In With Joind.InJoin In With Joind.In
Join In With Joind.In
 
Tool Up Your LAMP Stack
Tool Up Your LAMP StackTool Up Your LAMP Stack
Tool Up Your LAMP Stack
 
Going Freelance
Going FreelanceGoing Freelance
Going Freelance
 
Understanding Distributed Source Control
Understanding Distributed Source ControlUnderstanding Distributed Source Control
Understanding Distributed Source Control
 
Best Practice in Web Service Design
Best Practice in Web Service DesignBest Practice in Web Service Design
Best Practice in Web Service Design
 
Coaching Development Teams: Teach A Man To Fish
Coaching Development Teams: Teach A Man To FishCoaching Development Teams: Teach A Man To Fish
Coaching Development Teams: Teach A Man To Fish
 
Zend Certification Preparation Tutorial
Zend Certification Preparation TutorialZend Certification Preparation Tutorial
Zend Certification Preparation Tutorial
 
Implementing OAuth with PHP
Implementing OAuth with PHPImplementing OAuth with PHP
Implementing OAuth with PHP
 
Web Services Tutorial
Web Services TutorialWeb Services Tutorial
Web Services Tutorial
 
Object Oriented Programming in PHP
Object Oriented Programming in PHPObject Oriented Programming in PHP
Object Oriented Programming in PHP
 
Example Presentation
Example PresentationExample Presentation
Example Presentation
 
Could You Telecommute?
Could You Telecommute?Could You Telecommute?
Could You Telecommute?
 

Recently uploaded

find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
huseindihon
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
shanihomely
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
313mohammedarshad
 
CiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.pptCiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.ppt
moinahousna
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
HackersList
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
CEPTES Software Inc
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
ssuser1915fe1
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Networks
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
digitalxplive
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
aakash malhotra
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
Axel Rennoch
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
kumarjarun2010
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 

Recently uploaded (20)

find out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challengesfind out more about the role of autonomous vehicles in facing global challenges
find out more about the role of autonomous vehicles in facing global challenges
 
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
Premium Girls Call Mumbai 9920725232 Unlimited Short Providing Girls Service ...
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
 
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptxIntroduction-to-the-IAM-Platform-Implementation-Plan.pptx
Introduction-to-the-IAM-Platform-Implementation-Plan.pptx
 
CiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.pptCiscoIconsLibrary cours de réseau VLAN.ppt
CiscoIconsLibrary cours de réseau VLAN.ppt
 
WhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring AppsWhatsApp Spy Online Trackers and Monitoring Apps
WhatsApp Spy Online Trackers and Monitoring Apps
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
Salesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot WorkshopSalesforce AI & Einstein Copilot Workshop
Salesforce AI & Einstein Copilot Workshop
 
Feature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptxFeature sql server terbaru performance.pptx
Feature sql server terbaru performance.pptx
 
IPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite SolutionIPLOOK Remote-Sensing Satellite Solution
IPLOOK Remote-Sensing Satellite Solution
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
The Rise of AI in Cybersecurity How Machine Learning Will Shape Threat Detect...
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
The importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT StandardizationThe importance of Quality Assurance for ICT Standardization
The importance of Quality Assurance for ICT Standardization
 
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSECHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
CHAPTER-8 COMPONENTS OF COMPUTER SYSTEM CLASS 9 CBSE
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 

Linux-Fu for PHP Developers

  • 1. Linux-Fu for PHP Developers
  • 2. About Me Lorna Mitchell Developer at Ibuildings European Rep for http://phpwomen.org Personal blog http://lornajane.net Compulsive keyboard user (for accessibility reasons)
  • 4. Outline basic commands first utilities access permissions useful utilities
  • 7. pwd Print Working Directory - shows you where you are lorna@taygete:~/Documents$ pwd /home/lorna/Documents
  • 8. ls list files -a for all including hidden files lorna@taygete:~/Documents$ ls - a . jam_labels.pdf netball .. libmemcache_install_notes.txt tek_instructions.txt advent_web_services.rtf linux - fu_geekup.txt using_the_community.txt girlgeek_post2.txt memcache.odt jam_labels.odt memcache.rtf
  • 9. ls -l for long list ls -la lorna@taygete:~/Documents$ ls - la total 136 drwxr - xr - x 3 lorna lorna 4096 2009 - 04 - 24 09 : 37 . drwxr - xr - x 66 lorna lorna 4096 2009 - 04 - 23 17 : 33 .. - rw - r -- r -- 1 lorna lorna 16790 2008 - 12 - 04 22 : 54 advent_web_services.rtf - rw - r -- r -- 1 lorna lorna 1263 2008 - 12 - 10 12 : 16 girlgeek_post2.txt - rw - r -- r -- 1 lorna lorna 10700 2008 - 12 - 20 16 : 08 jam_labels.odt - rw - rw - rw - 1 lorna lorna 6747 2008 - 12 - 25 21 : 35 jam_labels.pdf - rw - r -- r -- 1 lorna lorna 316 2009 - 03 - 19 19 : 28 libmemcache_install_notes.txt - rw - r -- r -- 1 lorna lorna 189 2009 - 02 - 08 16 : 02 linux - fu_geekup.txt - rw - r -- r -- 1 lorna lorna 33275 2008 - 12 - 04 11 : 37 memcache.odt - rw - r - xr -- 1 lorna users 28205 2008 - 12 - 04 11 : 37 memcache.rtf drwxr - xr - x 2 lorna lorna 4096 2009 - 04 - 24 09 : 37 netball - rw - r -- r -- 1 lorna lorna 940 2008 - 12 - 09 09 : 43 tek_instructions.txt - rw - r -- r -- 1 lorna lorna 461 2008 - 11 - 28 22 : 49 using_the_community.txt
  • 10. ls -t for list by time -r for sort in reverse order lorna@taygete:~/Documents$ ls - lrt total 128 - rw - r -- r -- 1 lorna lorna 461 2008 - 11 - 28 22 : 49 using_the_community.txt - rw - r -- r -- 1 lorna lorna 33275 2008 - 12 - 04 11 : 37 memcache.odt - rw - r - xr -- 1 lorna users 28205 2008 - 12 - 04 11 : 37 memcache.rtf - rw - r -- r -- 1 lorna lorna 16790 2008 - 12 - 04 22 : 54 advent_web_services.rtf - rw - r -- r -- 1 lorna lorna 940 2008 - 12 - 09 09 : 43 tek_instructions.txt - rw - r -- r -- 1 lorna lorna 1263 2008 - 12 - 10 12 : 16 girlgeek_post2.txt - rw - r -- r -- 1 lorna lorna 10700 2008 - 12 - 20 16 : 08 jam_labels.odt - rw - rw - rw - 1 lorna lorna 6747 2008 - 12 - 25 21 : 35 jam_labels.pdf - rw - r -- r -- 1 lorna lorna 189 2009 - 02 - 08 16 : 02 linux - fu_geekup.txt - rw - r -- r -- 1 lorna lorna 316 2009 - 03 - 19 19 : 28 libmemcache_install_notes.txt drwxr - xr - x 2 lorna lorna 4096 2009 - 04 - 24 09 : 37 netball
  • 11. ls ls <path> to list contents of a different directory
  • 12. cd Change Directory cd <dir> to enter a subdir cd .. to go up a level lorna@taygete:~$ cd /etc lorna@taygete:/etc$ cd cron.d lorna@taygete:/etc/cron.d$ lorna@taygete:/etc/cron.d$ cd .. lorna@taygete:/etc$
  • 13. cd cd ~ to go home cd - to go back to where you came from lorna@taygete:/etc$ cd ~ lorna@taygete:~$ pwd /home/lorna lorna@taygete:~$ lorna@taygete:~$ cd - lorna@taygete:/etc$ pwd /etc
  • 15. touch creates an empty file with current timestamp no feedback (this is *nix) lorna@taygete:~/talks/temp$ touch unicorns.txt lorna@taygete:~/talks/temp$ ls - lA total 0 - rw - r -- r -- 1 lorna lorna 0 2009 - 04 - 24 09 : 50 unicorns.txt
  • 16. cat outputs a file to your terminal cat <file> lorna@taygete:~/talks$ cat orange.txt Oranges are not the only fruit ( name of a book ) lorna@taygete:~/talks$
  • 17. less/more pager for viewing longer content more <file> less <file> use less – it really is more in this case
  • 18. stdin/stdout stdin &quot;standard in&quot; – input to a program, usually command line arguments stdout &quot;standard out&quot; – output, usually to your screen
  • 20. pipe &quot;chaining&quot; operator output of one program pushed along the pipe to the input of the next
  • 21. pipe cat orange.txt index.php | more lorna@taygete:~/talks$ cat orange.txt index.php | more Oranges are not the only fruit ( name of a book ) < ?php class Response { public function output () { header ( 'Content-type: text/xml' ); echo '<?xml version=&quot;1.0&quot;?>' ; echo &quot; &quot; ; } } -- More --
  • 22. file redirection operators a.k.a. &quot;pointy brackets&quot; < and > > directs stdout to the named file >> appends to the file rather than truncating it before outputting
  • 23. file redirection operators lorna@taygete:~/talks$ mysqldump -- compact - u root - p test Enter password : SET @saved_cs_client = @@character_set_client ; SET character_set_client = utf8 ; CREATE TABLE `users` ( `user_id` int ( 11 ) NOT NULL auto_increment , `name` varchar ( 20 ) default NULL , PRIMARY KEY ( `user_id` ) ) ENGINE = MyISAM AUTO_INCREMENT = 2 DEFAULT CHARSET = latin1 ; SET character_set_client = @saved_cs_client ; INSERT INTO `users` VALUES ( 1 , 'lornajane' );
  • 24. file redirection operators lorna@taygete:~/talks$ mysqldump -- compact - u root - p test > test .sql Enter password : [email_address] :~/talks$ lorna@taygete:~/talks$ mysqldump -- compact - u root - p test | gzip > test .sql.gz Enter password : [email_address] :~/talks$
  • 25. file redirection operators < directs the contents of the file to stdin lorna@taygete:~/talks$ mysql - u root - p test < test .sql Enter password : lorna@taygete:~/talks$
  • 27. telnet not now used much for server access useful for direct port access telnet <host> <port>
  • 28. ssh Secure SHell prompts for password, you arrive at command prompt
  • 29. scp secure copy copies files over a one-off ssh connection if you have ssh access, this is available scp <source> <target> source and/or target can be remote paths
  • 30. scp [email_address] :~$ scp cherries.jpg lorna@rivendell.local:fruit.jpg lorna@rivendell.local's password: cherries.jpg 100% 162KB 162.3KB/s 00:00
  • 31. scp lorna@taygete:~$ scp cherries.jpg lorna@rivendell.local: lorna@rivendell.local's password: cherries.jpg 100% 162KB 162.3KB/s 00:00
  • 32. scp lorna@taygete:~$ scp -r talks lorna@rivendell.local:talks/ lorna@rivendell.local's password: thing.jpg 100% 162KB 162.3KB/s 00:00 credits.txt 100% 68 0.1KB/s 00:00 index.php 100% 167 0.2KB/s 00:00 cherries.jpg 100% 162KB 162.3KB/s 00:00 orange.txt 100% 44 0.0KB/s 00:00 misc.php 100% 59 0.1KB/s 00:00 long_file.txt 100% 2383 2.3KB/s 00:00 what.jpg 100% 162KB 162.3KB/s 00:00
  • 33. sftp SSH File Transfer Protocol similar to FTP many FTP clients handle SFTP more secure easy to set up, part of SSH server
  • 35. Permissions 10 characters of information see in the output of ls lorna@taygete:~/Documents$ ls - la total 136 drwxr - xr - x 3 lorna lorna 4096 2009 - 04 - 24 09 : 37 . drwxr - xr - x 66 lorna lorna 4096 2009 - 04 - 23 17 : 33 .. - rw - r -- r -- 1 lorna lorna 16790 2008 - 12 - 04 22 : 54 advent_web_services.rtf - rw - r -- r -- 1 lorna lorna 1263 2008 - 12 - 10 12 : 16 girlgeek_post2.txt - rw - r -- r -- 1 lorna lorna 10700 2008 - 12 - 20 16 : 08 jam_labels.odt - rw - rw - rw - 1 lorna lorna 6747 2008 - 12 - 25 21 : 35 jam_labels.pdf - rw - r -- r -- 1 lorna lorna 316 2009 - 03 - 19 19 : 28 libmemcache_install_notes.txt - rw - r -- r -- 1 lorna lorna 189 2009 - 02 - 08 16 : 02 linux - fu_geekup.txt - rw - r -- r -- 1 lorna lorna 33275 2008 - 12 - 04 11 : 37 memcache.odt - rw - r - xr -- 1 lorna users 28205 2008 - 12 - 04 11 : 37 memcache.rtf drwxr - xr - x 2 lorna lorna 4096 2009 - 04 - 24 09 : 37 netball - rw - r -- r -- 1 lorna lorna 940 2008 - 12 - 09 09 : 43 tek_instructions.txt - rw - r -- r -- 1 lorna lorna 461 2008 - 11 - 28 22 : 49 using_the_community.txt
  • 38. chmod change permissions chmod <class><operator><mode> <file> class: u,g,o,a (user, group, other, all) operator: +, -, = mode: r,w,x, or any combination
  • 39. chmod add execute permission for group lorna@taygete:~/Documents$ chmod g + rx memcache.rtf lorna@taygete:~/Documents$ ls - lA total 132 - rw - r -- r -- 1 lorna lorna 16790 2008 - 12 - 04 22 : 54 advent_web_services.rtf lrwxrwxrwx 1 lorna lorna 22 2009 - 03 - 16 12 : 04 downloads -> / home / lorna / downloads / - rw - r -- r -- 1 lorna lorna 1263 2008 - 12 - 10 12 : 16 girlgeek_post2.txt - rw - r -- r -- 1 lorna lorna 10700 2008 - 12 - 20 16 : 08 jam_labels.odt - rw - rw - rw - 1 lorna lorna 6747 2008 - 12 - 25 21 : 35 jam_labels.pdf - rw - r -- r -- 1 lorna lorna 189 2009 - 02 - 08 16 : 02 linux - fu_geekup.txt - rw - r -- r -- 1 lorna lorna 33275 2008 - 12 - 04 11 : 37 memcache.odt - rw - r - x r -- 1 lorna lorna 28205 2008 - 12 - 04 11 : 37 memcache.rtf - rw - r -- r -- 1 lorna lorna 9939 2009 - 03 - 09 15 : 23 netball_cancellation.pdf - rw - r -- r -- 1 lorna lorna 940 2008 - 12 - 09 09 : 43 tek_instructions.txt - rw - r -- r -- 1 lorna lorna 461 2008 - 11 - 28 22 : 49 using_the_community.txt
  • 40. chown chown lorna:users memcache.rtf lorna@taygete:~/Documents$ chown lorna : users memcache.rtf lorna@taygete:~/Documents$ ls - lA total 132 - rw - r -- r -- 1 lorna lorna 16790 2008 - 12 - 04 22 : 54 advent_web_services.rtf lrwxrwxrwx 1 lorna lorna 22 2009 - 03 - 16 12 : 04 downloads -> / home / lorna / downloads / - rw - r -- r -- 1 lorna lorna 1263 2008 - 12 - 10 12 : 16 girlgeek_post2.txt - rw - r -- r -- 1 lorna lorna 10700 2008 - 12 - 20 16 : 08 jam_labels.odt - rw - rw - rw - 1 lorna lorna 6747 2008 - 12 - 25 21 : 35 jam_labels.pdf - rw - r -- r -- 1 lorna lorna 189 2009 - 02 - 08 16 : 02 linux - fu_geekup.txt - rw - r -- r -- 1 lorna lorna 33275 2008 - 12 - 04 11 : 37 memcache.odt - rw - r - xr -- 1 lorna users 28205 2008 - 12 - 04 11 : 37 memcache.rtf - rw - r -- r -- 1 lorna lorna 9939 2009 - 03 - 09 15 : 23 netball_cancellation.pdf - rw - r -- r -- 1 lorna lorna 940 2008 - 12 - 09 09 : 43 tek_instructions.txt - rw - r -- r -- 1 lorna lorna 461 2008 - 11 - 28 22 : 49 using_the_community.txt
  • 41. root superuser don't log in as root log in, then su (substitute user) may need root privileges, to perform certain actions
  • 42. sudo avoids using root account gives root for a single command
  • 45. cURL tool for talking to the world over http lorna@taygete: ~$ curl http://localhost Example Home Page Array ( )
  • 46. cURL < ?php echo &quot;Example Home Page &quot; ; print_r ( $_POST ); ? >
  • 47. cURL checking actual browser response headers/content curl -I http://localhost (that's a capital i) lorna@taygete:~$ curl -I http://localhost HTTP/1.1 200 OK Date: Mon, 16 Mar 2009 12:35:10 GMT Server: Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.1 with Suhosin-Patch X-Powered-By: PHP/5.2.6-2ubuntu4.1 Vary: Accept-Encoding Content-Type: text/html
  • 48. cURL posting variables lorna@taygete:~$ curl -X POST http://localhost -d fruit=apple -d user=lornajane Example Home Page Array ( [fruit] => apple [user] => lornajane )
  • 49. wget web downloader lorna@taygete:~$ wget http :// www.splitbrain.org / _media / projects / dokuwiki / dokuwiki - 2009 - 02 - 14 .tgz -- 2009 - 04 - 24 10 : 40 : 16 -- http :// www.splitbrain.org / _media / projects / dokuwiki / dokuwiki - 2009 - 02 - 14 .tgz Resolving www.splitbrain.org... 78.46.97.149 Connecting to www.splitbrain.org | 78.46.97.149 |: 80 ... connected. HTTP request sent , awaiting response... 200 OK Length : 1770454 ( 1.7 M ) [ application / octet - stream ] Saving to : `dokuwiki-2009-02-14.tgz' 100%[=================================>] 1,770,454 1.39M/s in 1.2s 2009-04-24 10:40:18 (1.39 MB/s) - ` dokuwiki - 2009 - 02 - 14 .tgz ' saved [1770454/1770454]
  • 50. wget to mirror a site wget -m http://lornajane.net to resume large downloads wget -c http://localhost
  • 51. grep finding things (Global/Regular Expression/Print) grep [options] [pattern] [target]
  • 52. grep discover functions lorna@rivendell:~/svndir/snapshot/lib$ grep function Service.class.php * This class holds the functionality of the out - ward facing part of * This function is called to add a new request to the queue. public function requestShot ( $accountID , $requestURL , $returnURL = NULL , $height = 75 , $width = 100 ) { function getShotStatus ( $accountID , $transactionID ) { function getAccountStatus ( $accountID ) { function getShotList ( $accountID , $status = NULL ) { function getShot ( $accountID , $transactionID ) {
  • 53. grep look for class names in source tree lorna@rivendell:~/svndir/phergie$ grep - R '^class ' * | grep - v .svn | more Phergie / Event / Response.php : class Phergie_Event_Response Phergie / Event / Request.php : class Phergie_Event_Request Phergie / Driver / Streams.php : class Phergie_Driver_Streams extends Phergie_Driver_A bstract Phergie / Plugin / Drink.php : class Phergie_Plugin_Drink extends Phergie_Plugin_Abstr act_Command Phergie / Plugin / ModuleList.php : class Phergie_Plugin_ModuleList extends Phergie_Pl ugin_Abstract_Command Phergie / Plugin / Debug.php : class Phergie_Plugin_Debug extends Phergie_Plugin_Abstr act_Command Phergie / Plugin / Twitter / twitter.class.php : class Twitter { Phergie / Plugin / Twitter / laconica.class.php : class Twitter_Laconica extends Twitter {
  • 54. grep Recursive and case insensitive lorna@rivendell:~/svndir/snapshot$ grep - Ri 'select from' * lib / Model / Miscinfo.class.php : $row = $dbh -> read ( 'select * from misc_info where info_key = ' . $dbh -> quote ( $key ) . ' limit 1' ); lib / Model / Transaction.class.php : $row = $dbh -> read ( 'select * from transactions where transaction_id = ' . $dbh -> quote ( $transaction_id ) . ' limit 1' ); lib / Model / Transaction.class.php : $row = $dbh -> read ( 'select * from transactions where transaction_id = ' . $dbh -> quote ( $transaction_id ) . ' and account_id = ' . $dbh -> quote ( $account_id ) . ' limit 1' ); lib / Model / Transaction.class.php : $sql = 'select * from transactions where account_id = ' . $dbh -> quote ( $account_id ); lib / Model / Transaction.class.php : $sql = 'select * from transactions where status = ' . $dbh -> quote ( $status ); lib / Model / File.class.php : $row = $dbh -> read ( 'select * from files where id = ' . $dbh -> quote ( $id ) . ' limit 1' ); lib / Model / Account.class.php : $row = $dbh -> read ( 'select * from accounts where account_id = ' . $dbh -> quote ( $account_id ) . ' limit 1' ); lib / DBL / Database.class.php : * $rows = $db -> read ( 'select * from aTable' );
  • 55. find powerful &quot;grep&quot; using file metadata rather than content can search by name find . -name .htaccess also by modified time, by size, etc ...
  • 56. diff shows differences between files, doesn't show you what is the same lorna@taygete:~/talks$ diff misc.php.old misc.php 3 c3 < $link = mysql_connect ( 'localhost' , 'app_user' , 'yorkshirepud' ); --- > $link = mysql_connect ( 'localhost' , 'lorna' , 'candyfloss' );
  • 57. diff Unified diff format lorna@taygete:~/talks$ diff - u misc.php.old misc.php --- misc.php.old 2009 - 04 - 24 10 : 56 : 08.000000000 + 0100 +++ misc.php 2009 - 04 - 24 10 : 56 : 51.000000000 + 0100 @@ - 1 , 6 + 1 , 6 @@ < ?php - $link = mysql_connect ( 'localhost' , 'app_user' , 'yorkshirepud' ); + $link = mysql_connect ( 'localhost' , 'lorna' , 'candyfloss' ); $rhyme = &quot;Mary Had A Little Lamb&quot; ; echo $rhyme ;
  • 58. grep lorna@taygete:~/talks$ diff - u misc.php.old misc.php > patch .txt
  • 59. patch patch applies diff files
  • 60. patch lorna@taygete:~/talks$ cat example.php < ?php $link = mysql_connect ( 'localhost' , 'app_user' , 'yorkshirepud' ); ? > lorna@taygete:~/talks$ patch example.php < patch .txt patching file example.php lorna@taygete:~/talks$ cat example.php < ?php $link = mysql_connect ( 'localhost' , 'lorna' , 'candyfloss' ); ? > lorna@taygete:~/talks$
  • 61. tar Tape ARchive for gluing together files, for transfer lorna@taygete:~/talks$ ls cherries.jpg example.php long_file.txt orange.txt temp test .sql.gz what.jpg credits.txt index.php misc.php patch .txt test .sql thing.jpg lorna@taygete:~/talks$ tar - zcf talks.tgz * lorna@taygete:~/talks$ ls cherries.jpg example.php long_file.txt orange.txt talks.tgz test .sql thing.jpg credits.txt index.php misc.php patch .txt temp test .sql.gz what.jpg lorna@taygete:~/talks$
  • 62. nano widely available lightweight editor designed as a non-pine equivalent to pico (PIne COmposer) instructions are on-screen
  • 63. nano
  • 64. wc word count for counting lines lorna@taygete:~/tek09$ wc - l linux - fu_content.txt 283 linux - fu_content.txt
  • 65. tail looking at the end of a file tail -n50 access.log tail -f access.log
  • 66. screen opening several sessions in one window can detach, log out, come back
  • 67. screen protects against connection dropping saves logging into the same server many times use .screenrc for config
  • 69. man man pages are the manual man <command> name synopsis (example arguments) description (all the switches) examples, if you are lucky some tools use &quot;info&quot; instead
  • 70. man lorna@taygete:~$ man pwd PWD(1) User Commands PWD(1) NAME pwd - print name of current/working directory SYNOPSIS pwd [OPTION] DESCRIPTION Print the full filename of the current working directory. --help display this help and exit --version output version information and exit NOTE: your shell may have its own version of pwd, which usually supersedes the version described here. Please refer to your shellâÀÙs documentation for details about the options it supports.
  • 73. log files /var/log /var/log/apache2/access.log
  • 74. apache config ubuntu, debian /etc/apache2/sites-available redhat /etc/httpd/httpd.conf
  • 75. /usr/local for stuff that you've installed/added
  • 77. ps Process Status shows what is running, pid, user
  • 78. ps ps ax ps aux use with grep 6761 ? Ss 0 : 00 / usr / sbin / apache2 - k start 8009 ? S 0 : 00 / usr / sbin / apache2 - k start 8010 ? S 0 : 00 / usr / sbin / apache2 - k start 8011 ? S 0 : 00 / usr / sbin / apache2 - k start 8012 ? S 0 : 00 / usr / sbin / apache2 - k start 8013 ? S 0 : 00 / usr / sbin / apache2 - k start 24209 pts / 4 S + 0 : 00 grep apache
  • 79. top show current top processes sort by zxc z for colour x for column highlight c to show full command < > to change which column we're sorting by ** q to quit
  • 80. check apache is running use grep - look for &quot;apache&quot; or &quot;httpd&quot; if not: apache2ctl restart service httpd restart
  • 81. check mysql is running use grep if not: /etc/init.d/mysql start
  • 83. mkdir mkdir make directory lorna@taygete:~/temp$ ls lorna@taygete:~/temp$ mkdir examples lorna@taygete:~/temp$ ls examples
  • 84. mv and cp move and copy files lorna@taygete:~/temp$ ls cherries.jpg lorna@taygete:~/temp$ mv cherries.jpg oranges.jpg lorna@taygete:~/temp$ ls oranges.jpg lorna@taygete:~/temp$ cp oranges.jpg cherries.jpg lorna@taygete:~/temp$ ls cherries.jpg oranges.jpg lorna@taygete:~/temp$ cp /etc/php5/cli/php.ini php-cli.ini lorna@taygete:~/temp$ ls cherries.jpg oranges.jpg php-cli.ini
  • 85. rm remove files/directories cherries.jpg examples oranges.jpg lorna@taygete:~/temp$ rm oranges.jpg lorna@taygete:~/temp$ touch examples/dewdrops.txt lorna@taygete:~/temp$ rm examples/ rm: cannot remove `examples/': Is a directory lorna@taygete:~/temp$ rmdir examples rmdir: failed to remove `examples': Directory not empty lorna@taygete:~/temp$ rm -rf examples lorna@taygete:~/temp$ ls cherries.jpg
  • 86. ln link - creates a symlink or alias between directories lorna@taygete:~/Documents$ ln - s / home / lorna / downloads temp lorna@taygete:~/Documents$ cd temp lorna@taygete:~/Documents/temp$ pwd / home / lorna / Documents / temp lorna@taygete:~/Documents/temp$ ls FlickrDownload - 0.4 highlight - 2.7 . tar .gz libmemcached - 0.26 . tar .gz ZendFramework - 1.7.6 - minimal FlickrDownload - 0.4 . tar .gz key.txt lorna_andean_explorer_large.jpg ZendFramework - 1.7.6 - minimal. tar .gz highlight - 2.7 libmemcached - 0.26 sun - presenter - screen - linuxintel.oxt lorna@taygete:~/Documents/temp$
  • 87. cURL great for services flickr example curl -X POST http://api.flickr.com/services/rest/ -d method=flickr.photos.getRecent -d api_key=853b05c9... -d per_page=5
  • 88. cURL < ?xml version = &quot;1.0&quot; encoding = &quot;utf-8&quot; ? > < rsp stat = &quot;ok&quot; > < photos page = &quot;1&quot; pages = &quot;200&quot; perpage = &quot;5&quot; total = &quot;1000&quot; > < photo id = &quot;3359907386&quot; owner = &quot;24259661@N03&quot; secret = &quot;abcd3374c4&quot; server = &quot;3593&quot; farm = &quot;4&quot; title = &quot;Sandford 2009&quot; ispublic = &quot;1&quot; isfriend = &quot;0&quot; isfamily = &quot;0&quot; /> < photo id = &quot;3359907364&quot; owner = &quot;12383345@N06&quot; secret = &quot;0e5637d188&quot; server = &quot;3607&quot; farm = &quot;4&quot; title = &quot;DSC00159&quot; ispublic = &quot;1&quot; isfriend = &quot;0&quot; isfamily = &quot;0&quot; /> < photo id = &quot;3359907350&quot; owner = &quot;84656095@N00&quot; secret = &quot;3ca7085d12&quot; server = &quot;3461&quot; farm = &quot;4&quot; title = &quot;green&quot; ispublic = &quot;1&quot; isfriend = &quot;0&quot; isfamily = &quot;0&quot; /> < photo id = &quot;3359088077&quot; owner = &quot;20633056@N04&quot; secret = &quot;3d03f2b935&quot; server = &quot;3654&quot; farm = &quot;4&quot; title = &quot;03c&quot; ispublic = &quot;1&quot; isfriend = &quot;0&quot; isfamily = &quot;0&quot; /> < photo id = &quot;3359088059&quot; owner = &quot;33581202@N07&quot; secret = &quot;efa70c71f0&quot; server = &quot;3607&quot; farm = &quot;4&quot; title = &quot;DSCF4768&quot; ispublic = &quot;1&quot; isfriend = &quot;0&quot; isfamily = &quot;0&quot; /> </ photos > </ rsp >