Ah, yes. Zed Shaw’s Command Line Crash Course. I have “been meaning to” go through it the past 2½ yrs. But I guess that, as always, ✨now✨ is better than never. I’ve already picked up parts of this along the way, but there was plenty to learn more properly and intentionally now.

🎓 Commands I was not so much acquainted with yet:

  • pushd push directory
  • popd pop directory
  • cp copy a file or directory
  • mv move a file or directory
  • less page through a file
  • xargs execute arguments
  • apropos find which man page is appropriate
  • env look at your environment
  • export export/set a new environment variable
  • exit exit the shell

Moar notes

cd Palermo/'places to eat' for spaces in directory names
cd Palermo/places\ to\ eat or I can escape the space like this
cd ../../ for navigating up two levels

mkdir -p to make the path with new directories
touch makes a new empty file (unless it already exists)

ls -R to list content and subdirectories
ls -lR same with long listing format
ls something/ to list the content of a dir

pushd will save this dir for later, but for now go here
popd takes me back to the last saved dir

cp -r to copy directories with files

rm -r remove directories and contents recursively, so be careful!
also if empty directory but what-a-minute hello .DS_Store then:
rm -rf will force / ignore nonexistent files

xargs read a bit, sort of understand what it can do, but not quite when I need this yet.

chmod change mode! I remember this from working with file permissions in WordPress
chown change owner!


What now?