Terminal Command Files
Hey guys, this mad kids are on, and today is going to be a video on how to locate where the files for your terminal commands are and how to rename them, make copies of them, and delete them if necessary.
So first of all, I'm going to be showing you where the command LS is located on your computer. To do this in terminal, in fact, where is all in word space LS. Now I will point out that you should have watched our other terminal lessons before watching this video because they will assist you greatly in this video.
So if you type where is space and then terminal commands, it'll give you the full path to that terminal command. And so now say I want to get to slash bin, which is in /, which means it's in my hard drive. Say open a new Finder window, and I don't know how to get there because I click on Macintosh HD, and there's no folder called bin in here because it's hidden from you in Finder.
The way you get to any folder is, um, all you have to do is click on the Finder icon. It doesn't matter if a new window opens up; go up to Go in the Finder menu and then sink go to folder. Then you type the path like slash bin. And so now here's slash bin, the contents in slash bin.
Okay, and if I find LS, here's the terminal command file LS, and it is a UNIX executable file, and it's 72 kilobytes. Not that big. Here's make dirs. In that same place, all the system commands are normally in slash bin. All the other commands are normally in a slash user slash bin, and the rest are somewhere else.
To get the list of all the places and folders where commands could be, just type echo space dollar sign all caps path and hit enter, and here should your results right here. Each path is separated by a colon from the next path, like here slash user slash bin colon slash bin colon slash user slash s bin colon slash has been, etc. That's what I get.
I also have an extra few / as the SW slash bin because I've installed something called fink, which lets you install commands just like on Linux by typing apt-get install. So that adds an extra thing to your path.
So that is how to find your terminal command files. Now say you want to rename them; it's actually pretty simple. You just go to the folder, find the file LS, say we want to make a copy of LS. You copy that; I'm just going to paste it on my desktop.
Now I'm going to rename it lists. All my files cannot have a space in its name. Now I'm going to go back to slash head spin, drag it in, click authenticate to type my password because it needs a password.
So now if I type list all my files stay /, it's like typing and less /. So now I'm going to delete that because I might want to someday install a real program called list all my files that just deletes list on my files. I don't like messing around with my terminal commands, but you might have a separate opinion.
So I'm just going to open up terminal game. So if you delete one of those files, obviously, it gets rid of the terminal command. If you have two terminal commands in different places, whichever place it looks first, that terminal command will get run.
So that is how to easily find all your terminal commands. So thanks for watching, my kids, and please subscribe to our videos; it supports us greatly. And goodbye.