panel 1: ls .. and cd .. refer to different folders if you `cd` to a symlinked folder ~/Dropbox -> ~/Library/CloudStorage/Dropbox ``` cd ~ cd Dropbox ls .. cd .. ``` * ls .. lists ~/Library/CloudStorage * cd .. moves to ~ this is because `ls` is a program and `cd` is run by the shell. The shell handles `..` differently from other programs. `ls ~/Dropbox` will list the contents of the folder this is annoying if you just want to look at its permissions, or where it links to to fix this: ls -d ~/Dropbox panel 2: deleting a folder and recreating it with the exact same name makes everything weird everything you do in the folder will fail with weird errors like: $ touch newfile touch: newfile: no such file or directory how to fix it: ``` cd . ``` panel 3: on Mac OS, these are not the same: cp -R a/ b cp -R a b * `cp -R a/ b` merges the contents of `a` into `b` * `cp -R a b` copies the whole folder into `b/a` panel 4: tip: `cd -` switches to the folder you were previously in panel 5: notes on `mv file.txt dest~ * if dest is a file: renames `file.txt` * if dest is a folder: moves `file.txt` to that folder
https://cdn.masto.host/socialjvnsca/media_attachments/files/113/466/151/476/544/340/original/8778424dd2051991.png