Notes for Computer Information Technology 160
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sep26.md 806B

September 26 Notes

$ cat file vs $ less file # less allows you to scroll

$ docker cp <image container hash>:/path/to/file /local/path

# copy /path/to/file from a docker container to /local/path on your computer
$ ( echo 1 || exit 1 ) && { echo 2 ; echo 3 || exit 7; } && ( exit 5 )
  1. ( echo 1 || exit 1 ) exits 0
  2. { echo 2 ; echo 3 || exit 7; } exits 0
  3. ( exit 5 ) exits 5

How do you know the type of a file? ShaBang!

Sharp (#) Bang (!) on the first line of the file

#!/bin/bash for shell scripts

#!/usr/bin/python for python scripts

$ ls -l file.bash
-rwxrwxr-x 1 username username datetime file.bash*

the first - in -rwxrwxr-x means it is a file not a directory

r means read, w means write, x means execute

ugoa - user, group, others, all