Welcome - 9/30/17

Beginning CLI Usage

ALE - Atlanta Linux Enthusiasts

Thanks for coming out!
We are volunteers. Just some guys trying to spread Linux knowledge.

Hands-On Today


Get your Linux Computers up
Open a Terminal

Other Places For Info


  • EdX - free basic Linux training
  • Linux.com - free basic Linux training
  • CheatSheets.org
  • www.bob-carnaghi-online.net/index.html
    - ACC Linux Classes
  • probably millions of others ...

Jumping In ... ls


Open a terminal - any terminal ...

How Much Storage Available?



Examples:

 $ du /usr
 $ du -h ~/
 $ df -h .
 $ df
 $ df -i
 $ find /misc/Stuff -type f -size +3G \
     -exec ls -lh {} \; 

Main Directories


Linux File System Hierarchy Overview

File System Hierarchy

pwd



Examples:

$ cd /tmp                  
$ pwd

cd relative and absolute paths


These are all the same, if you are in your HOME on a normal Linux system.
cd ~ cd cd $HOME cd /home/{your-userid} cd ~/

A different example:

cd
pwd
cd /etc
cd
cd etc
cd ../../etc

Cmd History



Examples:

$ history
$ !!
$ !-5
$ !543
$ !vi
$ man history  # to learn more

$ ^string1^string2^
Quick substitution.  Repeat the 
last command, replacing string1 
with string2.  Equivalent to 
"!!:s/string1/string2/" 

Tab Completion


 $ ls{tab}{tab} 
 $ rdi{tab}- -{tab}-l{tab}-i{tab}-s{tab} 

Practice this. Any interesting ls-cmds?
Tab Completion Explained

Break Time


5 minutes

Shells


man -k shells

or

apropos shells

cp, mv, mkdir, rmdir, and File Management


Examples:

 $ cp /tmp/foo* ~/bin/
 $ mv /tmp/foo.txt ~/Docu*/
 $ mv /tmp/foo.txt ~/*ts/
 $ rm ~/bin/foo*
 $ rm ~/bin/*oo
 $ mkdir ~/bin 
 $ mkdir -p /tmp/foo/foo/foo
 $ rmdir /tmp/foo  #  work?
 $ rmdir -p  /tmp/foo  #  work?
 $ rmdir -p  /tmp/foo/foo/foo  #  work?*

Recursive Options


Calendar


      September             October               November              
 Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa 
                 1  2   1  2  3  4  5  6  7            1  2  3  4
  3  4  5  6  7  8  9   8  9 10 11 12 13 --   5  6  7  8  9 10 --
 10 11 12 13 14 15 16  15 16 17 18 19 20 21  12 13 14 15 16 17 --
 17 18 19 20 21 22 23  22 23 24 25 26 27 28  19 20 21 22 23 24 --
 24 25 26 27 28 29 30  29 30 31              26 27 28 29 30      
 

Thanks / Feedback


blog.jdpfu.com