Go through that CLI crash course
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:
pushdpush directorypopdpop directorycpcopy a file or directorymvmove a file or directorylesspage through a filexargsexecute argumentsaproposfind which man page is appropriateenvlook at your environmentexportexport/set a new environment variableexitexit 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?
- Bash Reference Manual
- Also note to self; it was not that long ago you had to find out wtf is bash anyway?!
- Revisit these notes as needed and put the commands to use already.