ubuntu practical guide

The shell doesn't require that the name of the program appear first on the command line

ubuntu@ubuntu:~/test1$ ls

ubuntu@ubuntu:~/test1$ <b cat
ubuntu   tty7         2015-03-15 02:28 (:0)
ubuntu   pts/0        2015-03-15 02:33 (:0)
Sun Mar 22 10:20:41 PDT 2015


ubuntu@ubuntu:~/test1$ >t <b cat
ubuntu@ubuntu:~/test1$ ls
b  t

-----------------------
The shell doesn't look through all directories but only the ones specified by the variable named PATH

-----------------------
ubuntu@ubuntu:~/test1$ cat b
ubuntu   tty7         2015-03-15 02:28 (:0)
ubuntu   pts/0        2015-03-15 02:33 (:0)
Sun Mar 22 10:20:41 PDT 2015
ubuntu@ubuntu:~/test1$ cat b | grep -o ubuntu | tr ubuntu UBUNTU
UBUNTU
UBUNTU
ubuntu@ubuntu:~/test1$ 
----------------------
ubuntu@ubuntu:~/test1$ who | tee who.out | grep ubuntu
ubuntu   tty7         2015-03-15 02:28 (:0)
ubuntu   pts/0        2015-03-15 02:33 (:0)
ubuntu@ubuntu:~/test1$
ubuntu@ubuntu:~/test1$ ls
b  t  who.out
----------------------
fg or  % followed by the number of job you want to bring into the foreground
ubuntu@ubuntu:~/test1$ sleep 10 &
[1] 6321
ubuntu@ubuntu:~/test1$ % 1
sleep 10
ubuntu@ubuntu:~/test1$ sleep 10 &
[1] 6323
ubuntu@ubuntu:~/test1$ fg 1
sleep 10
ubuntu@ubuntu:~/test1$ 
--------------
buntu@ubuntu:~/test1$ sleep 10 &
[1] 6338
ubuntu@ubuntu:~/test1$ kill 6338
ubuntu@ubuntu:~/test1$ jobs
[1]+  Terminated              sleep 10
ubuntu@ubuntu:~/test1$ 

--------------------------
ubuntu@ubuntu:~/test1$ echo *
b t who.out
ubuntu@ubuntu:~/test1$ ls
b  t  who.out
ubuntu@ubuntu:~/test1$ 
--------------------------
*[^a-b] matches any filename that doesn't begin with a, b

ubuntu@ubuntu:~/test1$ ls file*
filea  fileb  filec  filed
ubuntu@ubuntu:~/test1$ ls file*[a-b]
filea  fileb
ubuntu@ubuntu:~/test1$ ls file*[^a-b]
filec  filed
ubuntu@ubuntu:~/test1$ 



Comments

Popular posts from this blog

HAproxy logging

tomcat catalina coyote jasper cluster

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all