Changes between Version 8 and Version 9 of cypress/BasicLinuxComands


Ignore:
Timestamp:
08/18/15 21:57:56 (9 years ago)
Author:
cmaggio
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/BasicLinuxComands

    v8 v9  
    183183== Intermediate Linux Commands ==
    184184
     185=== Star Wildcard ===
     186Shell commands can often make use of the wildcard characters. The most universal of these is the asterisk or star wildcard, *. This acts as a stand-in for any and all strings.
     187 
    185188=== ls again ===
    186 The behavior of the '''ls''' command can be modified by the addition of option flags. By default '''ls''' does not list any "hidden" files and subdirectories. To display all files and subdirectories one must add the ''-a'' flag.
     189Suppose we have a directory containing many files, but we only want to list files ending with the .txt extension. We can use the * wildcard to request a list of any file ending in .txt
     190
     191{{{
     192[tulaneID@cypress1 ~]$ ls
     193a.out  NextDirectoryDown helloworld.c  textfile01.txt  textfile02.txt
     194[tulaneID@cypress1 ~]$ ls *.txt
     195textfile01.txt  textfile02.txt
     196[tulaneID@cypress1 ~]$
     197}}}
     198
     199Additionally, the behavior of the '''ls''' command can be modified by the addition of option flags. By default '''ls''' does not list any "hidden" files and subdirectories. To display all files and subdirectories one must add the ''-a'' flag.
    187200
    188201{{{
    189202[tulaneID@cypress1 ~]$ ls -l
    190203total 4
    191 drwxr-xr-x 2 tuhpc002 workshop 4096 Aug 18 16:17 NextDirectoryDown
     204-rw-r--r-- 1 tulaneID workshop    0 Aug 18 21:50 a.out
     205drwxr-xr-x 2 tulaneID workshop 4096 Aug 18 21:37 NextDirectoryDown
     206-rw-r--r-- 1 tulaneID workshop    0 Aug 18 21:50 helloworld.c
     207-rw-r--r-- 1 tulaneID workshop    0 Aug 18 21:50 textfile01.txt
     208-rw-r--r-- 1 tulaneID workshop    0 Aug 18 21:50 textfile02.txt
    192209[tulaneID@cypress1 ~]$ ls -al
    193210total 56
    194 drwx------ 6 tuhpc002 workshop 4096 Aug 18 20:03 .
     211drwx------ 6 tulaneID workshop 4096 Aug 18 20:03 .
    195212drwxr-xr-x 5 root     root     4096 Aug 12 13:00 ..
    196 -rw------- 1 tuhpc002 workshop  107 Aug 18 16:59 .bash_history
    197 -rw-r--r-- 1 tuhpc002 workshop   18 Jul 18  2013 .bash_logout
    198 -rw-r--r-- 1 tuhpc002 workshop  176 Jul 18  2013 .bash_profile
    199 -rw-r--r-- 1 tuhpc002 workshop  124 Sep 30  2014 .bashrc
    200 -rw-r--r-- 1 tuhpc002 workshop  500 May  7  2013 .emacs
    201 drwxr-xr-x 2 tuhpc002 workshop 4096 Nov 11  2010 .gnome2
    202 -rw-r--r-- 1 tuhpc002 workshop  171 Aug  6  2014 .kshrc
    203 drwxr-xr-x 4 tuhpc002 workshop 4096 Aug  6  2014 .mozilla
    204 drwxr-xr-x 2 tuhpc002 workshop 4096 Aug 18 16:17 NextDirectoryDown
    205 drwx------ 2 tuhpc002 workshop 4096 Aug 13 16:18 .ssh
    206 -rw------- 1 tuhpc002 workshop 1786 Aug 18 20:03 .viminfo
    207 -rw------- 1 tuhpc002 workshop   54 Aug 13 16:18 .Xauthority
     213-rw------- 1 tulaneID workshop  107 Aug 18 16:59 .bash_history
     214-rw-r--r-- 1 tulaneID workshop   18 Jul 18  2013 .bash_logout
     215-rw-r--r-- 1 tulaneID workshop  176 Jul 18  2013 .bash_profile
     216-rw-r--r-- 1 tulaneID workshop  124 Sep 30  2014 .bashrc
     217-rw-r--r-- 1 tulaneID workshop  500 May  7  2013 .emacs
     218drwxr-xr-x 2 tulaneID workshop 4096 Nov 11  2010 .gnome2
     219-rw-r--r-- 1 tulaneID workshop  171 Aug  6  2014 .kshrc
     220drwxr-xr-x 4 tulaneID workshop 4096 Aug  6  2014 .mozilla
     221drwxr-xr-x 2 tulaneID workshop 4096 Aug 18 16:17 NextDirectoryDown
     222drwx------ 2 tulaneID workshop 4096 Aug 13 16:18 .ssh
     223-rw------- 1 tulaneID workshop 1786 Aug 18 20:03 .viminfo
     224-rw------- 1 tulaneID workshop   54 Aug 13 16:18 .Xauthority
    208225[tulaneID@cypress1 ~]$
    209226}}}