Unix Terminal

Extract all files from a subdirectory

cd into the top-level directory

find . -mindepth 2 -type f -print -exec mv {} . \;

List only one file per line

ls -1a

Append a file extension to all files in a directory

for i in *; do mv "$i" "$i.jpg"; done

Fetch a list of images using xargs and curl

xargs -n 1 curl -O < images.txt

Fetch a list of images by URL and rename with a Do-While Loop

while read -r url name ; do curl -o $name $url done < urls.txt

Concatenate CSV files with identical headers -

CSV files (of same formatting) are aggregated in a directory. CD into that directory.

for f in *.csv; do cat "`pwd`/$f" | tail -n +2 >> merged.csv; done

ZSH Configuration

The .zshrc file is created by the user in their home directory, it controls ZSH configuration options. For instance, there is a function that allows commands to be executed automatically every time a directory level is changed:

function cd {
    builtin cd "$@" && ls
}

Alternately, you can use the ZSH-specific syntax (built-in function):

chpwd() {
  ls
}

List Active Displays

system_profiler SPDisplaysDataType

Feel free to get in touch with any questions.