the name of the remote computer the user (Linux web host)

the name of the remote computer the user had logged in from, if that user had logged in from another computer on the network. Checking directories and permissions Associated with each shell is a location in the Linux file system known as the current or working directory. As previously mentioned, each user has a directory that is identified as the user s home directory. When you first log in to Linux, you begin with your home directory as the current directory. When you request to open or save a file, your shell uses the current directory as the point of reference. Simply give a filename when you save a file and it will be placed in the current directory. Alternatively, you can identify a file by its relation to the current directory (relative path). Or you can ignore the current directory and identify a file by the full directory hierarchy that locates it (absolute path). The structure and use of the file system is described in detail later in this chapter. To find out what your current directory is, type the pwd command: $ pwd /usr/bin In this example, the current/working directory is /usr/bin. To find out the name of your home directory, type the echo command, followed by the $HOME variable: $ echo $HOME /home/chris In the above example, the home directory is /home/chris. To get back to your home directory, you can simply type the change directory (cd) command. Although cd changes the current directory to any directory that you choose, simply typing cd takes you to your home directory: $ cd At this point, list the contents of your home directory, using the ls command. Either you can type the full path to your home directory to list its contents, or you can use the ls command without a directory name to list the contents of the current directory. Using the -a option to ls enables you to view the hidden files (dot files) as well as other files. With the -l option, you can see a long, detailed list of information on each file. (You can put multiple single-letter options together after a single dash, for example, -la.) $ ls -la /home/chris total 158 drwxrwxrwx 2 chris sales 1024 Jan 12 13:55 . drwxr-xr-x 3 root root 1024 Jan 10 01:49 .. -rw-r–r– 1 chris sales 1155 Jan 10 01:50 .Xdefaults -rw——- 1 chris sales 2204 Jan 18 21:30 .bash_history -rw-r–r– 1 chris sales 24 Jan 10 01:50 .bash_logout -rw-r–r– 1 chris sales 230 Jan 10 01:50 .bash_profile -rw-r–r– 1 chris sales 124 Jan 10 01:50 .bashrc -rw-rw-r– 1 chris sales 149872 Jan 11 22:49 letter Displaying a long list (-l option) of the contents of your home directory shows you more about file sizes and directories. Directories such as the current directory (.) and the directory above the current directory (..) are noted as directories by the letter “d” at the beginning of each entry. In this case, dot (.) represents /home/chris and two dots (..), which is also referred to as the parent directory, represents /home. The /home directory is owned by root. All other files are owned by the user chris (who belongs to the sales group). The filenames shown on the right are mostly dot (.) files that are used to store GUI properties (.Xdefaults) or shell properties (.bash files). The only non-dot file shown in this example is the one named letter. At the
Note: If you are looking for cheap webhost to host and run your apache application check Vision apache web hosting services

Leave a Reply