!$ takes the last argument from the previous command, instead of the whole thing.
chmod 664 site/* - changes the permissions for all the files in the site directory. * is a wildcard in bash for specifying directories.
Another useful feature of bash is brace expansion:
mv site{,-old} => mv site site-old
The brace expansion expands the argument with the values in a comma separated list: college pic_00{1,4,3}.jpeg college.jpeg yields pic_001 pic_004, pic_003
* is a wildcard for everything in the directory including files and directories.
so the chmod will remove the execute permission from directories also.
!$ takes the last argument from the previous command, instead of the whole thing.
chmod 664 site/* - changes the permissions for all the files in the site directory. * is a wildcard in bash for specifying directories.
Another useful feature of bash is brace expansion: mv site{,-old} => mv site site-old The brace expansion expands the argument with the values in a comma separated list: college pic_00{1,4,3}.jpeg college.jpeg yields pic_001 pic_004, pic_003