Linux File Path (part 1)

Ғылым және технология

Linux file path is a way to locate a specific file or directory on a Linux system. It is represented by a string of characters that specifies the location of the file or directory relative to the root directory (/) of the file system.
A file path consists of one or more directory names separated by a forward slash (/) character, followed by the file or directory name. For example, /home/user/myfile.txt is a file path that points to a file named "myfile.txt" located in the directory "user" under the directory "home" under the root directory.
There are two types of file paths in Linux: absolute and relative paths. An absolute path specifies the complete path from the root directory to the file or directory. It always starts with a forward slash (/), as in the example above. Relative paths, on the other hand, specify the path to the file or directory relative to the current directory. They do not begin with a forward slash and can use special characters such as the dot (.) and double-dot (..) to refer to the current directory and parent directory, respectively.
Here are some common file path shortcuts in Linux:
~ : Refers to the current user's home directory
. : Refers to the current directory
.. : Refers to the parent directory

Пікірлер: 2

  • @aronwomack359
    @aronwomack359 Жыл бұрын

    Good video, idk if you know, probably so lol. But just cd will take you back home.

  • @nikkiinit

    @nikkiinit

    Жыл бұрын

    lol, Yes I know. I'm so used to giving the cd command a path.

Келесі