Inside Linux Current Working Directory At any one (Free web hosts)
Inside Linux Current Working Directory At any one time, you are located in some directory within the tree. This is referred to as the current working directory. Any command that you execute uses the current directory. The pwd command can be used to print the current working directory as a full pathname. The following dialog demonstrates this: stimpy $ pwd /home/mtobler stimpy $ You can change the current working directory using the cd command. This is shown in the following example: stimpy $ cd /bin stimpy $ pwd /bin stimpy $ As previously mentioned, many commands use the current working directory. The ls command is an example of this. If you execute the command ls without specifying a path, it displays the contents of the current directory. The Home Directory Every user known to the system has a home directory. User-specific configuration files are stored in a user’s home directory. Standard practice dictates that users store their personal files here. When I say personal, I am not necessarily referring to private files, although you can store private files here. If you do, you may want to encrypt files stored there or set special permissions to those directories and files. Personal files mainly refer to data files specific to a user. For example, any word processing documents that you create should be stored in your home directory. More specifically, they should be stored in a directory under your home directory. For instance, you may store your spreadsheet data files in a directory named /home/username/spreadsheet. The directory username is substituted for your username. You can quickly get to your home directory using the cd command without an argument. The following dialog shows the command in action: stimpy $ pwd /usr/local/etc stimpy $ cd stimpy $ pwd /home/mtobler stimpy $ Optionally, you can use the tilde character (~) to specify your home directory. There is no need to use it with the cd command, but it might be useful in other situations. Suppose that one of your coworkers has a file that you need. Suzy Cue tells you that the file is named employees.doc and is found in her home directory (scue). The following is a dialog to use to copy that file to your home directory. stimpy $ cp ~scue/employees.doc ~ stimpy $ pwd /usr/local/etc stimpy $ cd stimpy $ pwd /home/mtobler stimpy $ As you start working with various software packages, be sure to organize your home directory to match each package. If you store all files you work with only in your home directory, it can become very cluttered! Some Basic Commands We have covered a lot of ground so far concerning Linux. Much of this information provides a good, basic understanding of Linux. Among other things, we learned how to start up, shut down, log in and out, and create user accounts. We also learned about environment variables, files and directories, shells, command completion, and virtual consoles. With this basic knowledge, it is time to turn our attention to some basic commands. The sections that follow investigate how to move around in Linux, how to view the contents of a directory, how to create and delete directories and files, and how to get help. page 55
Note: If you are looking for high quality webhost to host and run your jsp application check Vision jsp web hosting services