Unix File and Directory Names

In UNIX (and LINUX) file and directory names are made up of numbers, letters, and underscores, without spaces. In the path name of a file or directory, the directories, and file name are separated by slashes. For example, a file first_try in the sub-directory proj1 of the directory comp1571 in the current directory has the local path name comp1571/proj1/first_try relative to the current directory.

A Summary of Basic UNIX Commands

$ ls lists the files and folders in the working directory
$ ls -l lists the files and folders in the working directory, with additional information
$ cd a_dir changes the working directory to the directory a_dir in the present working directory
$ pwd returns the name of the working directory
$ cd .. changes the working directory to the directory one above it
$ cd dir changes the working directory to the sub-directory with the local path name dir of the current directory
$ cp file1 file2 copies file1 to file2, overwriting file2 if it already exists
$ cp files directory copies files to directory
$ rm a_fileremoves a_file
$ mkdir new_dircreates a new directory new_dir in the working directory
$ rmdir old_dirremoves the directory old_dir from the working directory
$ chmod 755 a_filesets permissions on a_file to allow you to read write and execute the file, and everyone else to read and execute it