Manipulation pt 7 wildcards


#1

I cant seem to get the whole thing some one out there please help!!


#2

$ pwd
/home/ccuser/workspace/movies

$ ls -als
total 20
4 drwxr-xr-x 5 ccuser ccuser 4096 Feb 11 12:54 .
4 drwxr-xr-x 3 ccuser ccuser 4096 Feb 11 12:54 ..
0 -rw-r--r-- 1 ccuser ccuser 0 Jun 30 2015 .preferences
4 drwxr-xr-x 4 ccuser ccuser 4096 Jul 7 2015 action
4 drwxr-xr-x 3 ccuser ccuser 4096 Jul 7 2015 comedy
4 drwxr-xr-x 4 ccuser ccuser 4096 Jun 29 2015 drama
0 -rw-r--r-- 1 ccuser ccuser 0 Jun 29 2015 genres.txt

$ #change to directory action/
$ cd action/

$ pwd
/home/ccuser/workspace/movies/action

$ ls -als
total 24
4 drwxr-xr-x 4 ccuser ccuser 4096 Jul 7 2015 .
4 drwxr-xr-x 5 ccuser ccuser 4096 Feb 11 12:54 ..
0 -rw-r--r-- 1 ccuser ccuser 0 Jun 29 2015 matrix-reloaded.txt
4 -rw-r--r-- 1 ccuser ccuser 21 Jun 29 2015 matrix-revolutions.txt
4 -rw-r--r-- 1 ccuser ccuser 2305 Jun 29 2015 matrix.txt
4 drwxr-xr-x 2 ccuser ccuser 4096 Jul 7 2015 scifi
4 drwxr-xr-x 2 ccuser ccuser 4096 Jul 7 2015 superhero

============================================

$# no superman.txt file exists
$# create empty file with the touch-command
$touch superman.txt

$ ls -als
total 24
4 drwxr-xr-x 4 ccuser ccuser 4096 Feb 11 12:59 .
4 drwxr-xr-x 5 ccuser ccuser 4096 Feb 11 12:54 ..
0 -rw-r--r-- 1 ccuser ccuser 0 Jun 29 2015 matrix-reloaded.txt
4 -rw-r--r-- 1 ccuser ccuser 21 Jun 29 2015 matrix-revolutions.txt
4 -rw-r--r-- 1 ccuser ccuser 2305 Jun 29 2015 matrix.txt
4 drwxr-xr-x 2 ccuser ccuser 4096 Jul 7 2015 scifi
4 drwxr-xr-x 2 ccuser ccuser 4096 Jul 7 2015 superhero
0 -rw-r--r-- 1 ccuser ccuser 0 Feb 11 12:59 superman.txt
$ #mv superman.txt superhero/

$ ls -als superhero/
total 24
4 drwxr-xr-x 2 ccuser ccuser 4096 Jul 7 2015 .
4 drwxr-xr-x 4 ccuser ccuser 4096 Feb 11 12:59 ..
4 -rw-r--r-- 1 ccuser ccuser 10 Jun 29 2015 spiderman.txt
8 -rw-r--r-- 1 ccuser ccuser 4246 Jun 29 2015 superman.txt
4 -rw-r--r-- 1 ccuser ccuser 3724 Jun 29 2015 wonderwoman.txt

$ #superman.txt already exist in superhero/ directory
$ mv superman.txt superhero/

$ ls -als superhero/
total 16
4 drwxr-xr-x 2 ccuser ccuser 4096 Feb 11 13:01 .
4 drwxr-xr-x 4 ccuser ccuser 4096 Feb 11 13:01 ..
4 -rw-r--r-- 1 ccuser ccuser 10 Jun 29 2015 spiderman.txt
0 -rw-r--r-- 1 ccuser ccuser 0 Feb 11 12:59 superman.txt
4 -rw-r--r-- 1 ccuser ccuser 3724 Jun 29 2015 wonderwoman.txt

$ #superman.txt has newer date

===============================================

$ #change to the superhero/ directory
$ cd superhero/

$ pwd
/home/ccuser/workspace/movies/action/superhero

$ ls -als
total 16
4 drwxr-xr-x 2 ccuser ccuser 4096 Feb 11 13:01 .
4 drwxr-xr-x 4 ccuser ccuser 4096 Feb 11 13:01 ..
4 -rw-r--r-- 1 ccuser ccuser 10 Jun 29 2015 spiderman.txt
0 -rw-r--r-- 1 ccuser ccuser 0 Feb 11 12:59 superman.txt
4 -rw-r--r-- 1 ccuser ccuser 3724 Jun 29 2015 wonderwoman.txt

$ #navigate up from the action/superhero/ to the action/ directory
$ cd ..
$ pwd
/home/ccuser/workspace/movies/action

$ ls -als
total 24
4 drwxr-xr-x 4 ccuser ccuser 4096 Feb 11 13:01 .
4 drwxr-xr-x 5 ccuser ccuser 4096 Feb 11 12:54 ..
0 -rw-r--r-- 1 ccuser ccuser 0 Jun 29 2015 matrix-reloaded.txt
4 -rw-r--r-- 1 ccuser ccuser 21 Jun 29 2015 matrix-revolutions.txt
4 -rw-r--r-- 1 ccuser ccuser 2305 Jun 29 2015 matrix.txt
4 drwxr-xr-x 2 ccuser ccuser 4096 Jul 7 2015 scifi
4 drwxr-xr-x 2 ccuser ccuser 4096 Feb 11 13:01 superhero

$ mv wonderwoman.txt batman.txt superhero/
mv: cannot stat ‘wonderwoman.txt’: No such file or directory
mv: cannot stat ‘batman.txt’: No such file or directory