As a self-appointed system administrator on this machine, I extend my greetings. This machine is still an experimental one, so all sorts of unexpected things can occur, and changes are sure to be made. Be sure to back up your important work on this machine elsewhere. Please bear with this, and don't hesitate to e-mail your suggestions to me at sbratus@ccs.neu.edu.
A few things about the current configuration:
The .tcshrc and .login files contain customizations of your shell. Don't edit them unless you are sure. See the next item for tips on command aliases (which can be included into .tcshrc). Currently, they refer to the common files in /etc/dotfiles , which contain a few aliases that make life safer and easier.
The texinputs directory is the default place where TeX and LaTeX will look for your own style and other texinput files. If you need a special TeX package, put it there (it's OK to put into a subdirectory of texinputs ).
~ -> /home/sergey
while . is expanded into the full name of the current directory.
The command pwd will tell you your current directory.
$ pwd
/home/sergey
$ cd texinputs
$ pwd
/home/sergey/texinputs
The command which <command> will tell you where the executable file of command is. For instance,
$ which emacs
/usr/bin/emacs
Remember that all paths that start with / are traced from the root, while those that don't start with your current directory.
$ cp myfile.tex texinputs/
copies myfile.tex from the current directory into
/home/sergey/texinputs/myfile.tex
$ cp myfile.tex /texinputs/
reports error - no directory /texinputs exists
$ cp myfile.tex texinputs -- directory name without trailing / !
attempts to create file /home/sergey/texinputs first,
then, seeing that a directory of that name exists, does the
expected.
$ cp ~/myfile.tex .
copies myfile.tex from the home directory
(that is, /home/sergey/myfile.tex ) into the _current_ directory,
whatever that might be.
$ cp /home/nick/somfile.tex ~/mine-now.tex
steals another user's file and puts it into your home dir under a new
name.
$ ls
lists the files in current directory, except the files
whose names that start with .
$ ls -a
shows ALL files
$ ls -F
same as ls , but adds * to the names of executable files
and / to the names of directories
$ ls -l
same as ls , but shows owners and sizes of files
$ rm *.tex
removes all files whose names end in .tex
$ rm -i *.tex
same as above, but asks about removing each file
Suppose you want to run some command always with specific options. Then alias it:
$ alias rm rm -i -- now rm will work as rm -i
$ alias ls ls -F -- sets ls to be ls -F , always
Commands aliased like this last until you log out. To load you aliases each time you log in, add them to your .tcshrc file. See /etc/dotfiles/.tcshrc.all for common aliases. To see your current aliases, just type alias <Enter>.
To see permissions on a file, do ls -l .
$ ls -l test.txt
-rw-r--r-- 1 sergey users 14 Sep 4 18:29 test.txt
This file, test.txt , is owned by sergey, of the group users. Its permissions are -rw-r--r-- , that is:
- r w - r - - r - -
^ user group all others
| perm. perm.
|
+---- it's a regular file
readable and writable by owner, not executable
readable, but not writable for anyone in group users
readable, but not writable for anyone else
Here are the permissions of a file readable, writable and executable by
anyone: -rwxrwxrwx (very insecure),
you alone: -rwx----- (others cannot read or copy it, but see below)
If don't want anyone to read your file, do
$ chmod a-r test.txt -- remove reading permissions for all users $ chmod u+r test.txt -- give read permission, to you (user) alone
Directories:
drwxr-xr-x 4 sergey users 1024 Aug 17 00:02 Work
Work is a directory, owned by sergey , of the group users . The leading d in permissions stands for directory. Anyone can cd to this directory and read or copy files from it, but only the user can write and delete files. If you don't want people to view the contents of your directory, do
$ chmod a-x Work -- remove executable permission for all users $ chmod u+x Work -- give permission to yourself only
NOTE: If your directory is writable for others, they can delete ANY files in it, even non-readable and non-writable for them !