cd into the top-level directory
find . -mindepth 2 -type f -print -exec mv {} . \;
ls -1a
for i in *; do mv "$i" "$i.jpg"; done
xargs -n 1 curl -O < images.txt
while read -r url name ; do curl -o $name $url done < urls.txt
read
reads a line of text from standard input and splits it into words
-r
uses "raw" input, and causes read
to interpret backslashes literally, rather than as escape characters
Pass in two variables, "url" and "name"
curl
fetches files at the remote url
-o
save that data into a local file
<
specify the url
and name
list location and the file's name
Execute this command in a sub-directory to keep lists and files separate, but remember to update the path to the list file (e.g. ../
)
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
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
}
system_profiler SPDisplaysDataType
Feel free to get in touch with any questions.