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:
cpcopy a file or directory
mvmove a file or directory
lesspage through a file
aproposfind which man page is appropriate
envlook at your environment
exportexport/set a new environment variable
exitexit the shell
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
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!
- 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.