TTT 48: Whats with Directories in Linux?

Enjoyed this video? Join my Locals community for exclusive content at techfreedom317.locals.com!
1 year ago
192

Folder? Directory? What the hell?
How to Switch Directories
Free Your Internet
How to Make a New Directory

TTT 48.1 – Why All the Directories? Aren’t They Just Folders?
Were you confused by the change in terms? Don’t feel bad about it, when I thought about it until recently, I was too. Why are folders called directories in *Nix operating systems? Let’s find out, shall we?
What’s the difference between a folder and a directory in real life? A folder is simply a container for other smaller items. A directory (think of a phone book, or something along those lines) is a repository of sorts for various datapoints: names, addressses, phone numbers, etc. They do slightly different things, and are slightly different metaphorically.
So, where does the directory thing come from in *Nix? It is something that got inherited from Unix, and that is because in Unix, a directory really is just an index pointing to where the contents of your files actually are, rather than actually containing said files, as in a Windows Folder. Functionally, they do the same things, but are different when the rubber meets the road, so to speak. As you learn Linux or other *Nix OSes, it will be helpful to keep the term directory in mind, particularly if you are doing things in the terminal or command line environment, as those center around the directory terminology.
Why did Windows and MacOS start calling them folders instead? Perhaps because it was a useful and familiar metaphor, once we started moving to GUI environments. It is simply a good way to visualize things that wasn’t as abstract as directories and indexes.

https://itsfoss.com/folder-directory-linux/
#TTT #alternatives #contacts #FOSS #applealts #Linux #TechFreedom #FOSSnews

TTT 48.2 – How do you navigate amongst directories in *Nix?
I could just say well, use the CD command, but that isn’t quite all there is to it. Let’s consider this. If you just type cd, it will ask you for an argument. What is an argument in programming? It is a phrase which tells the computer what to do that command to, and where it is. So, if you want to change directories in the terminal, you have to know what the path is to the directory you want to navigate to. What is a path, in Linux? A path is simply how to get wherever the directory or file you want to access is in your given file system. Think of this as knowing the Dewey decimal number for a book you need at the library, then you have to know how to find that number, that is the path. Without the path, the system doesn’t know where to look for the file or directory you want to navigate to. I’ll show you an example on my own computer. There are two kinds of paths in *Nix file systems: absolute paths and relative paths. An absolute path starts from the root and goes all the way out to the directory in question. A relative path starts from wherever you currently are in the file system to wherever you want to go.
That said, cd by itself will simply take you to the Home directory on that machine.
Relative paths would take you from say your user’s home directory to Documents or Videos by simply typing Documents or Videos.
The absolute path route will go something like this /home/user/Home/Documents/stuff , so it starts with the slash.
A couple of pro tips though, if you want a shorthand way to tell it to start wherever you are in the file system, just type cd ./path/to/where/you/want/to/go. The ./ is key here.
If you want to navigate up 1 level in the system, then go wherever ../wherever/you/want/to/go. If you want to see what is in the directory where you currently are, simply type ls and it will give you a readout of the directories and files present in that directory. Be very careful with how you type things out, as Linux is CaSe SenSItive. For example, Downloads is not the same as downloads. Stay focused on typing the path correctly, then you will be able to navigate quickly. Also, if you drag and drop a directory from your file manager, it will give you the full path there in the terminal. That somewhat defeats the purpose of this exercise, but if it works, don’t knock it,
https://itsfoss.com/change-directories/
#TTT #changedirectories #howto #nutsnbolts #Linux #TechFreedom #FOSSnews
a.
Free Your Internet

http://techfreedom.pro/internet-freedom/

One-stop shop for getting you and your business transitioned off of Big Tech online platforms and tools, so that you have control of your data once again. I will also help you to find better alternatives.

#TTT #techtips #TechFreedom #internetfreedom #nogoogle #nometa #noyahoo #nomicrosoft #Truth
TTT 48.3 – How to Make a New Directory in Linux via the Terminal
The simple thing to do is to explore the mkdir command. That is what we will do now, since you are now an adept at navigating through the Linux file system with the cd command in all its glory... The thing that we need to keep in mind though, is what is where in the Linux file structure, so I will put the Linux directory system cheat sheet up beside the terminal window for this segment of the show. So what is mkdir? It is the command which will enable you to create a directory of your choice wherever you happen to be at the moment in the file system. The basic syntax goes like this: mkdir dir_name (replace whatever is after the space with a name of your choosing). Et viola: you have a brand new directory with the name you chose, in whichever other directory where you were to begin with. Is there more to it than that? You betcha. If you want to move around in directories before you pick your spot, refer back to the tutorial we just did on the cd command. If you want to go back to your personal home directory, just type cd (with nothing after it). Once there, you can choose to drill down a level, perhaps in to Documents, or simply start a new directory there in your home’s root directory. Pick a name for your new directory, then type mk_dir playtime (or something like that) and it will make that directory for you. All you will have to do in order to see it in the terminal is to run the ls command. Then you can cd into your new directory, and we will move on.
Here’s where it starts to get interesting, making multiple directories on the same level or even nesting them. Here’s how you make multiple directories at once: mkdir dir1 dir2 dir3 (change the names as you see fit once more) and you will have new directories inside of your first one in your home directory. If you want to make nested directories, the easiest way to do that is to use the –p variable like this: mkdir –p /yada/yada/yada (which will make a new directory called yada, then make a directory called yada within it, then another called yada nested within ./yada/yada . If that sounds like Greek to you, don’t feel bad, you’re just getting started on this journey.

How can you make a subdirectory within a directory you are not currently accessing?
Use the –p variable just as I just explained.

These were the basics of the mkdir command.

https://itsfoss.com/make-directories/
#TTT #FOSS #Linux #terminaltips #mkdir #directories #filestructure #howto #FOSS #TechFreedom #FOSSnews
a.
10 Things My Wife Thinks You Should Know about Tech Freedom.

https://rumble.com/v19elx6-10-things-about-tech-freedom.html?mref=2jfr3&mc=anr3y

#TechFreedom #wifeysauce #getfree #explainer

https://rumble.com/v2blbdm-memesplanation-short-march-7-2023.html?mref=2jfr3&mc=anr3y

Loading comments...