Inside Linux One thing to keep in mind, (Web hosting billing)

Inside Linux One thing to keep in mind, as we discussed previously: Linux is a case-sensitive operating system. For example, the two files help and Help are unique names under Linux. If you try to change to the directory /Usr, you most likely will get an error that the directory does not exist. What you meant to type was /usr. Moving Around in the Linux Directory System Moving around from directory to directory is a common task in Linux. If every file were stored in a single directory, you would never have to move around. The fact is, though, that Linux maintains a directory tree and you will eventually have to move about. We briefly touched on the cd command in previous sections. It is short for change directory. The syntax for cd is cd [dir] If you do not provide any arguments to cd, it changes the current directory to be your home directory. If dir is a valid directory, cd changes the current directory to dir. The argument to cd can be either .. or .. Remember that .. is the current directory’s parent and . is the current directory itself. If you are in the root, then issuing the command cd .. changes the current directory to the root, because root is the parent of itself. The following are some examples of the cd command: stimpy $ pwd /usr/local/etc stimpy $ cd .. stimpy $ pwd /usr/local stimpy $ cd ~ stimpy $ pwd /home/mtobler stimpy $ cd / stimpy $ pwd / stimpy $ cd .. stimpy $ pwd / stimpy $ cd stimpy $ pwd /home/mtobler stimpy $ cd / stimpy $ pwd / stimpy $ cd ../home/mtobler. stimpy $ pwd /home/mtobler stimpy $ If you are coming from the DOS world, be sure to use the / (slash) character as a file and directory separator. Linux uses the (backslash) character to continue a command on the next line. Viewing a Directory’s Contents In Linux (and UNIX), the command to view the contents of a directory is ls, which is short for list. A directory list contains both files and directories. This command is similar to the DOS command dir. In fact, most Linux systems define dir to be an alias for ls. The syntax for ls is as follows: ls [options] [names] The ls command has many switches (or options) - too numerous to list here. Refer to the man page for ls. Some examples follow. The following lists the status of /bin: stimpy $ ls -ld /bin List the files in the current directory, listing the oldest first: stimpy $ ls -rt * List all files in the current directory, in long format: stimpy $ ls -al * Depending on the shell, you can get a directory listing in color. The differing colors represent the different types of files. For example, green represents executable files. page 56
Note: If you are looking for best quality webspace to host and run your tomcat application check Vision shared web hosting services

Leave a Reply