2364828-Basic-Unix-Commands

2364828-Basic-Unix-Commands - Fundamental UNIX Commands...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
UNIX: Fundamental UNIX Commands Page CMNDS-1 Fundamental UNIX Commands SYNOPSIS This section describes fundamental concepts and commands for using the UNIX operating system. The most distinguishing characteristic of the UNIX operating system is the file system structure. The file system structure resembles an inverted tree, with the user's files as leaves along the bottom and the root at the top. The user's home directory (the directory you are placed in when you log in) is placed at a specific point in the structure but the user is not limited to that directory. It is possible to move around in the tree - up, down, and sideways - into directories belonging to other users and/or the system. Users can protect their files and directories from the prying eyes of others by changing access permissions. Each file and directory has a path name which uniquely identifies it. The path is described, starting with the root, down through the branches of the tree, to the directory containing the file. Filenames must be unique within a directory. On Central UNIX, this tree structure is spread over all of the sites that exist in the cluster cd path<CR> The change directory command moves the user from the current working directory to the directory specified. If path is defined as a simple name such as docs , then docs is located directly below the current directory and the user is moved into it. The command cd , by itself on a line, returns the user to the login directory. Examples of uses of cd are cd docs<CR> Move down to the directory named docs . cd . .<CR> Move up to the parent directory of the current directory. cd . ./data<CR> Move up to the parent directory of the current directory, then down to the directory named data . cd /usr/local/bin<CR> Move to the explicit directory location. cd ~login_ID<CR> Move to the home directory of the user specified by login_ID (C Shell only). ls<CR> Lists the contents of the current directory. ls has many parameters. You will probably find the following to be the most useful: ls -a Lists all files, including invisible files (files with a leading dot (.)). ls -l Lists all visible files and some attributes. ls -F Places a slash ( / ) after directory files and an asterisk ( * ) after executable files, and places an at-sign ( @ ) after symbolic links. INTRODUCTION DIRECTORY MANIPULATION COMMANDS
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Page CMNDS-2 UNIX: Fundamental UNIX Commands ls -R Recursively lists all files, including those in sub-directories from the current sub-directory to all sub-directories below. ls -s Lists all visible files and their file size in blocks. ls -slagF Command for a full directory listing (all attributes). mkdir directory<CR> This command is used to create a new directory within the current directory. pwd<CR>
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/21/2009 for the course CMPE 130 taught by Professor Mrobinson during the Fall '09 term at San Jose State University .

Page1 / 20

2364828-Basic-Unix-Commands - Fundamental UNIX Commands...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online