Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 1. The Tools > Using the Command Line - Pg. 28

28 MAKING THINGS TALK Using the Command Line Once you've connected to the remote web server, you should see something like this: Last login: Wed Feb 22 08:50:04 2006 from 216.157.45.215 [userid@myhost ~]$ Now you're at the command prompt of your web host's computer, and any command you give will be executed on that computer. Start off by learning what directory you're in. To do this, type the following: pwd This is a list of all the files and subdirectories of the current working directories, and their attributes. The first column lists who's got permissions to do what (read, modify, or execute/run a file). The second lists how many links there are to that file elsewhere on the system; it's not something you'll have much need for, most of the time. The third column tells you who owns it, and the fourth tells you the group (a collection of users) the file belongs to. The fifth lists its size, and the sixth lists the date it was last modified. The final column lists the filename. In a Unix environment, all files whose names begin with a dot are invisible. Some files, like access-control files that you'll see later in the book, need to be invisible. You can get a list of all the files, including the invisible ones, using the ­a modifier for ls, this way: which stands for "print working directory." It asks the computer to list the name and pathname of the directory in which you're currently working. You'll see that many Unix commands are very terse, so you have to type less.