The T-shell supports use of arrow keys to recall and edit commands. The default C-shell (/bin/csh) does not.
Password Reset The first screen is a logon screen. This site contains several other links to system utilities. Be sure to logout when finished. Unix Tipsman cpThe result is a detailed description of the cp command. The descriptions sometimes are technical, however.
strauss.udel.edu%althought this may vary, and can be customized. UNIX file names may contain as many as 255 characters, but most file names contain two parts, a root consisting of a few to several characters followed by an extension consisting of up to eight characters, although these conventions often are violated. The root and extension are separated by a period - root.ext. UNIX file names are case sensitive. So, for example, contents.sas is not the same as CONTENTS.SAS. The UNIX file system is hierarchical, similar to Windows. Individual files are placed in directories, often called folders. Directory names consist of paths, with each subdirectory separated from the others in a path by a forward slash, for example -
~/sasclassindicates a directory named sasclass. The directory sasclass is a subdirectory of the user's home directory (the ~/ is a shorthand notation for the complete path defining your home directory, in this example - /home/usra/7d/32007/). UNIX directory paths contain no drive letters. Type UNIX commands at the UNIX prompt. UNIX commands also are case sensitive. So, for example, ls is not the same as LS.
quota -v
This command returns a summary of your UNIX disk quota which looks
something like --
Disk quotas for traing (uid 16558):
Filesystem usage quota limit timeleft files quota limit timeleft
/home/usra 5128 10240 10240 532 76800 76800
/home/kodos/vol0
30680 204800 204800 1 76800 76800
To request more disk quota, go to the
the network page
ls
ls ~larryh/sasintro/*.sas
Note that the second line produces a list of all the files in a
subdirectory of my home directory with an extension of
.sas. The tilde ~
before a username stands for the user's home directory.
mkdir sasclass
If it executes correctly, you get no reply from the mkdir command.
cd sasclass
If it executes correctly, you get no reply from the cd command.
pwd
The pwd command returns the full pathname
of your current directory, for example --
/home/usra/7d/32007/sasclassThe cd command with no directory name brings you back to your home directory. Try this, then type pwd to see the name of your home directory. Then change directory back to sasclass. Here is the sequence --
cd
pwd
cd sasclass
pwd
If it executes correctly, you get no reply from the two cd
commands. You should get something analogous to --
/home/usra/7d/32007
to the first pwd command and something like --
/home/usra/7d/32007/sasclassin response to the second pwd command.
cp ~larryh/sasnotes/contents.sas .
This command copies the file in the ~larryh/sasclass directory called contents.sas into your current working
directory (sasclass). Note: The
period at the end indicates to use the same filename as the
original filename. Either a period or a file name is a
required part of the syntax.
pico contents.sas
The pico
screen shows most of the key
commands at the bottom. Exit pico by pressing
^X.
mv contents.sas cont.sas
ls
mv cont.sas contents.sas
ls
You get no response from the mv
commands. You should get --
cont.sas
from the first ls command and --
contents.sas
from the second.
cat contents.sas
This is a short file and displays easily on one screen. You should
see --
options linesize=80 noovp;
libname lhsas '~larryh/sasnotes';
proc contents data=lhsas.gss04; run;
But the cat command is useful primarily for short files.
more ~larryh/sasnotes/dataprep.sas
This file (
~larryh/sasnotes/dataprep.sas)
contains more lines than one terminal screen.
While viewing it with more,
use --
| <SPACEBAR> | go down a full screen | |
| b | go back a full screen | |
,
j
|
go down one line | |
| /string | search forward for string | |
| ? | for help | |
| q | for quit before the end of the file |
cp contents.sas abc
cat contents.sas abc
diff contents.sas abc
You get no response from the cp command.
The cat command is used to list the files
to the screen so you can see they are the same. The diff command returns no response. Only if the
files being compared differ does diff
return a reply. The reply is cryptic (code for changing one file so
it matches the other). As a beginner, use it as an indicator that
the files are different.
rm abc
ls abc
If your account is set up correctly, the rm command reponds by asking you to confirm you
want to remove the file. (If it doesn't see me after
class.) --
rm: remove abc (yes/no)?
Respond with y. The ls command returns an error --
abc: No such file or directory
indicating that the file named abc no
longer is there.
man sas
The "man page" for SAS does not contain a lot of information.
). Try this
exercise: First, list some executable files on strauss without
using the pipe --
ls -lL /opt/bin
Then try piping the list into less --
ls -lL /opt/bin | less
Use the following keys to navigate through the pager named
less --
| q | quit | |
| <SPACEBAR>, d | Down one full screen | |
| b | Back one full screen | |
j,
![]() |
Down one line | |
,
k |
Up one line | |
| G | Go to bottom of the file | |
| g | Go to top of the file | |
| /<string> | Search forward for "<string>" | |
| ?<string> | Search backward for "<string>" | |
| n | Repeat most recent search going in the same direction | |
| N | Repeat most recent search going in the opposite direction | |
| h | Help (q to exit help) | |
| -i | Toggle case sensitive. First use: ignore case differences in searches. Second use: honor case differences again. |
cd
ls -lR | less
If you are new to UNIX, you probably don't have a long list.
Use the forward slash to search forward or question mark to search backward for a file name. Use -i to toggle less to ignore case or honor case differences. Try searching for a file with contents in its name, like this
/contents
Change your directory back to sasclass --
cd sasclass