Anda di halaman 1dari 12

WIy do geL u IIcense error wIen sLurLIng MuLIub?

Matlab is heavily-used application in the UNX Computing environment at Stanford. While the University's agreement
with the vendor allows a large number of concurrent users it is not unusual, during times of peak usage, for all
licenses to be in use. f all licenses are in use it is not possible to start a new instance of Matlab until a currently
running Matlab process is quit and i
Read more
WIere cun IInd InIormuLIon on UNX und Inux compuLIng resources
uL SLunIord?
%he UNX Computing Resources service provides UNX and Linux facilities for general and research computing to
anyone with a full-service SUNet D.
%he UNX Computing Resources at Stanford web page provides Getting Started information for UNX users at
Stanford.
un use UNX uppIIcuLIons wILI grupIIcuI InLerIuce Irom u remoLe
IocuLIon?
Yes. UNX applications with a graphical user-interface require X-windows or other remote display software when
connecting from a remote location. %wo methods are currently supported: X-windows (Apple X11 on Mac OS X 10.3
(Panther) or later), and VNC on Windows systems.
Read more
Wus LIere u SLunIord versIon oI Kerberos Ior UNX?
Stanford used to provide a modified version of Kerberos for UNX systems. %hese modifications were non-standard,
aren't present in the Kerberos programs that come with current operating systems, and are mostly obsolete given the
retirement of Kerberos v4.
Read more
un use SSH pubIIc-key uuLIenLIcuLIon Lo Iog InLo SLunIord UNX
IosLs?
Kerberos authentication is supported for single sign-on, but it is not possible to use SSH public-key authentication
when connecting to Stanford hosts as a matter of policy. Public-key authentication does not integrate well with key
elements of Stanford's UNX infrastructure.
Read more
WIere cun IInd documenLuLIon Ior end users oI UNX und Inux OS?
%he UNX Documentation at Stanford page links to documentation, resources, and help for end users of the UNX
and Linux operating systems.
How Lo: EnubIe progrums Lo conLInue Lo run uILer IogouL.
Any batch process can continue running after logout when started using 'nohup' command. Some applications may
require additional configuration to ensure that they run non-interactively while unattached, and jobs running for longer
than 24 hours must use 'keeptoken' to retain AFS credentials.
Any batch process can continue running after logout when started using the 3ohup command, or when running in
a scree3 session.
Read more
un cIunge LIe deIuuIL sIeII on SLunIord UNX IosLs?
You can't change the default shell on Stanford UNX hosts using any of the standard tools, but you can use the tcsh
built-in function exec to launch another shell from the .cshrc or .login configuration file (for example, exec bash).
Read more
WIuL pIuLIorms does WebAuLI supporL?
%he primary target platforms for WebAuth development are Solaris and Linux, but the code should be portable to any
Unix system. %he modules make extensive use of Apache 2.0's APR libraries for portability. t has been successfully
built on Mac OS X 10.2 (with a locally built OpenSSL, since the version that comes with 10.2 was still too old to
support WebAuth).
Read more
How do scIeduIe UNX communds or scrIpLs sLored In AS Lo run
uuLomuLIcuIIy?
%he scheduling service allows you to run UNX commands or scripts stored in AFS at specified intervals. %hese
commands are called 'cron jobs' and are useful for a variety of purposes such as updating a website daily, or running
monthly reports on databases.
Read more
SecurILy Ior WIndows, MucInLosI, und UNX ompuLers.
%here are a number of basic steps that every computer user can and should take to make their computers safer. %o
learn what you can do to safeguard your computer and data, see the Security for Windows, Macintosh, and Unix
Computers page.
unnoL wrILe Lo UNX Iome dIrecLory, cIunge permIssIons, or copy
IIIes Lo dIrecLory LIrougI AS
f you can't write to your UNX home directory, copy files to the directory through AFS, or change permissions, run the
following command at the Unix prompt to give yourself permission:
fsr setacl /afs/ir/users/e/c/eckles eckles all
f you need more help, submit a HelpSU request or call 5-HELP.
How do geL my HosLD?
Here is how to find your HostD:
$ Wi3dows
1. n a Command Prompt window, run ipconfig /all.
2. %ake the Physical Address of the first Ethernet adapter listed.
3. Remove the dashes (-).
$oIaris
%ype hostid at the command prompt.
Li3ux
Read more
WIuL Iuppened Lo UnIx-SPRES?
% Services Unix-SPRES support ended January 10, 2011.
Error: unnoL Iock LIe .XuuLIorILy IIIe wIen uLLempLIng Lo connecL
usIng VN or sLurLIng X-WIndows.
%he most common cause of this error message is that insufficient space exists in a user's home directory to
accommodate the X-windows startup procedure or the VNC log file.
Enough space must be freed before X-Windows or VNC will run normally.









Basic UNIX commands
noLe noL all of Lhese are acLually parL of unlx lLself and you may noL flnd Lhem on
all unlx machlnes 8uL Lhey can all be used on tur|ng ln essenLlally Lhe same way by
Lyplng Lhe command and hlLLlng reLurn noLe LhaL some of Lhese commands are
dlfferenL on nonSolarls machlnes see SunCS dlfferences
lf youve made a Lypo Lhe easlesL Lhlng Lo do ls hlL C1kLu Lo cancel Lhe whole llne
8uL you can also edlL Lhe command llne (see Lhe gulde Lo More unlx)
unlx ls casesenslLlve
Files
O llsLs your flles
llsLs your flles ln long formaL whlch conLalns loLs of useful
lnformaLlon eg Lhe exacL slze of Lhe flle who owns Lhe flle and who has Lhe
rlghL Lo look aL lL and when lL was lasL modlfled
a llsLs all flles lncludlng Lhe ones whose fllenames begln ln a doL whlch
you do noL always wanL Lo see
1here are many more opLlons for example Lo llsL flles by slze by daLe
recurslvely eLc
O refi/enome shows Lhe flrsL parL of a flle [usL as much as wlll flL on one
screen !usL hlL Lhe space bar Lo see more or Lo qulL ?ou can use $ottern Lo
search for a paLLern
O eacfi/enome ls an edlLor LhaL leLs you creaLe and edlL a flle See
Lhe emacs page
O fi/enome1 fi/enome2 moves a flle (le glves lL a dlfferenL name or
moves lL lnLo a dlfferenL dlrecLory (see below)
O cpfi/enome1 fi/enome2 coples a flle
O rfi/enome removes a flle lL ls wlse Lo use Lhe opLlon rm l whlch wlll ask
you for conflrmaLlon before acLually deleLlng anyLhlng ?ou can make Lhls your
defaulL by maklng anallas ln your cshrc flle
O |fffi/enome1 fi/enome2 compares flles and shows where Lhey dlffer
O cfi/enome Lells you how many llnes words and characLers Lhere are ln a
flle
O chtins fi/enome leLs you change Lhe read wrlLe and execuLe
permlsslons on your flles 1he defaulL ls LhaL only you can look aL Lhem and
change Lhem buL you may someLlmes wanL Lo change Lhese permlsslons lor
example ch+rfi/enome wlll make Lhe flle readable for everyone
and chrfi/enome wlll make lL unreadable for oLhers agaln noLe LhaL
for someone Lo be able Lo acLually look aL Lhe flle Lhe dlrecLorles lL ls ln need
Lo be aL leasL execuLable See help proLecLlon for more deLalls
O llle Compresslon
4 gz|pfi/enome compresses flles so LhaL Lhey Lake up much less space
usually LexL flles compress Lo abouL half Lhelr orlglnal slze buL lL
depends very much on Lhe slze of Lhe flle and Lhe naLure of Lhe
conLenLs 1here are oLher Lools for Lhls purpose Loo (eg cpre)
buL gzlp usually glves Lhe hlghesL compresslon raLe Czlp produces flles
wlLh Lhe endlng gz appended Lo Lhe orlglnal fllename
4 gunz|pfi/enome uncompresses flles compressed by gzlp
4 gzcatfi/enome leLs you look aL a gzlpped flle wlLhouL acLually havlng
Lo gunzlp lL (same as gunz|pc) ?ou can even prlnL lL dlrecLly
uslng gzcatfi/enome$pr
O prlnLlng
4 prfi/enome prlnL use Lhe opLlon Lo speclfy Lhe prlnLer name lf
you wanL Lo use a prlnLer oLher Lhan your defaulL prlnLer lor example
lf you wanL Lo prlnL doubleslded use lpr valkyrd or lf youre aL
CSLl you may wanL Lo use lpr cord113d See help prlnLers for more
lnformaLlon abouL prlnLers and Lhelr locaLlons
4 p check ouL Lhe prlnLer queue eg Lo geL Lhe number needed for
removal or Lo see how many oLher flles wlll be prlnLed before yours wlll
come ouL
4 prnumer remove someLhlng from Lhe prlnLer queue ?ou can
flnd Lhe [ob number by uslng lpq 1heoreLlcally you also have Lo speclfy
a prlnLer name buL Lhls lsnL necessary as long as you use your defaulL
prlnLer ln Lhe deparLmenL
4 gencr|pt converLs plaln LexL flles lnLo posLscrlpL for prlnLlng and
glves you some opLlons for formaLLlng Conslder maklng an allas
llke a|aecpgencr|pt2r"&$prhar Lo prlnL Lwo pages on
one plece of paper
4 |pfi/enome prlnL | flles (le flles produced by La1ex) ?ou can
use |eect Lo prlnL only selecLed pages See Lhe La1ex page for more
lnformaLlon abouL how Lo save paper when prlnLlng drafLs
irectories
lrecLorles llke folders on a MaclnLosh are used Lo group flles LogeLher ln a
hlerarchlcal sLrucLure
O |rirnome make a new dlrecLory
O cirnome change dlrecLory ?ou baslcally go Lo anoLher dlrecLory and
you wlll see Lhe flles ln LhaL dlrecLory when you do ls ?ou always sLarL ouL ln
your home dlrecLory and you can geL back Lhere by Lyplng cd wlLhouL
argumenLs cd wlll geL you one level up from your currenL poslLlon ?ou
donL have Lo walk along sLep by sLep you can make blg leaps or avold
walklng around by speclfylng paLhnames
O p Lells you where you currenLly are
Finding things
O ff flnd flles anywhere on Lhe sysLem 1hls can be exLremely useful lf youve
forgoLLen ln whlch dlrecLory you puL a flle buL do remember Lhe name ln
facL lf you use ffp you donL even need Lhe full name [usL Lhe beglnnlng 1hls
can also be useful for flndlng oLher Lhlngs on Lhe sysLem eg documenLaLlon
O grepstrinq fi/enome{s) looks for Lhe sLrlng ln Lhe flles 1hls can be useful a
loL of purposes eg flndlng Lhe rlghL flle among many flgurlng ouL whlch ls
Lhe rlghL verslon of someLhlng and even dolng serlous corpus work grep
comes ln several varleLles (grep egrep and fgrep) and has a loL of very
flexlble opLlons Check ouL Lhe man pages lf Lhls sounds good Lo you
-out other people
O Lells you whos logged ln and whaL Lheyre dolng Lspeclally useful Lhe
ldle parL 1hls allows you Lo see wheLher Lheyre acLually slLLlng Lhere Lyplng
away aL Lhelr keyboards rlghL aL Lhe momenL
O h Lells you whos logged on and where Lheyre comlng from useful lf
youre looklng for someone whos acLually physlcally ln Lhe same bulldlng as
you or ln some oLher parLlcular locaLlon
O f|ngerusernome glves you loLs of lnformaLlon abouL LhaL user eg when
Lhey lasL read Lhelr mall and wheLher Lheyre logged ln CfLen people puL
oLher pracLlcal lnformaLlon such as phone numbers and addresses ln a flle
called pan 1hls lnformaLlon ls also dlsplayed by flnger
O at1usernome Lells you when Lhe user lasL logged on and off and from
where WlLhouL any opLlons at wlll glve you a llsL of everyones loglns
O tausernome leLs you have a (Lyped) conversaLlon wlLh anoLher user
O r|teusernome leLs you exchange onellne messages wlLh anoLher user
O e leLs you send emall messages Lo people around Lhe world (and of
course read Lhem) lLs noL Lhe only maller you can use buL Lhe one we
recommend See Lhe elm page and flnd ouL abouL Lhe deparLmenLal malllng
llsLs (whlch you can also flnd ln /user/llngulsLlcs/helpflle)
-out your (electronic) self
O ha| reLurns your username Sounds useless buL lsnL ?ou may need Lo
flnd ouL who lL ls who forgoL Lo log ouL somewhere and make sure *you*
have logged ouL
O f|nger plan flles
of course you can flnger yourself Loo 1haL can be useful eg as a qulck check
wheLher you goL new mall 1ry Lo creaLe a useful plan flle soon Look aL oLher
peoples plan flles for ldeas 1he flle needs Lo be readable for everyone ln
order Lo be vlslble Lhrough flnger o chmod a+r plan lf necessary ?ou
should reallze LhaL Lhls lnformaLlon ls accesslble from anywhere ln Lhe world
noL [usL Lo oLher people on Lurlng
O pa leLs you change your password whlch you should do regularly (aL
leasL once a year) See Lhe L88 gulde and/or look aL help password
O puurusernome llsLs your processes ConLalns loLs of lnformaLlon abouL
Lhem lncludlng Lhe process l whlch you need lf you have Lo klll a process
normally when you have been klcked ouL of a dlalln sesslon or have
oLherwlse managed Lo geL yourself dlsconnecLed abrupLly Lhls llsL wlll conLaln
Lhe processes you need Lo klll 1hose may lnclude Lhe shell (Lcsh or whaLever
youre uslng) and anyLhlng you were runnlng for example emacs or elm 8e
careful noL Lo klll your currenL shell Lhe one wlLh Lhe number closer Lo Lhe
one of Lhe ps command youre currenLly runnlng 8uL lf lL happens donL
panlc !usL Lry agaln ) lf youre uslng an xdlsplay you may have Lo klll some x
processes before you can sLarL Lhem agaln 1hese wlll show only when you
use pef because Lheyre rooL processes
O |9 kllls (ends) Lhe processes wlLh Lhe l you gave 1hls works only for
your own processes of course CeL Lhe l by uslng p lf Lhe process doesnL
dle properly use Lhe opLlon 9 8uL aLLempL wlLhouL LhaL opLlon flrsL
because lL doesnL glve Lhe process a chance Lo flnlsh posslbly lmporLanL
buslness before dylng ?ou may need Lo klll processes for example lf your
modem connecLlon was lnLerrupLed and you dldnL geL logged ouL properly
whlch someLlmes happens
O uta show whaL your dlsk quoLa ls (le how much space you have Lo
sLore flles) how much youre acLually uslng and ln case youve exceeded your
quoLa (whlch youll be glven an auLomaLlc warnlng abouL by Lhe sysLem) how
much Llme you have lefL Lo sorL Lhem ouL (by deleLlng or gzlpplng some or
movlng Lhem Lo your own compuLer)
O ufi/enome shows Lhe dlsk usage of Lhe flles and dlrecLorles
ln flleoome (wlLhouL argumenL Lhe currenL dlrecLory ls used) u glves only a
LoLal
O aturusernome llsLs your lasL loglns Can be a useful memory ald for
when you were where how long youve been worklng for and keeplng Lrack
of your phoneblll lf youre maklng a nonlocal phonecall for dlalllng ln
onnecting to the outside world
O nn allows you Lo read news lL wlll flrsL leL you read Lhe news local Lo Lurlng
and Lhen Lhe remoLe news lf you wanL Lo read only Lhe local or remoLe news
you can use nn ornnr respecLlvely 1o learn more abouL nn Lype nn Lhen
LLyman Lhen LLy* Lhen LLyZ Lhen hlL Lhe space bar Lo sLep Lhrough
Lhe manual Cr look aL Lhe man page Cr check ouL Lhe hyperLexL nn lAC
probably Lhe easlesL and mosL fun way Lo go
O rg|nstnome leLs you connecL Lo a remoLe hosL
O tenetstnome also leLs you connecL Lo a remoLe hosL
use rg|n whenever posslble
O ftpstnome leLs you download flles from a remoLe hosL whlch ls seL up as
an fLpserver 1hls ls a common meLhod for exchanglng academlc papers and
drafLs lf you need Lo make a paper of yours avallable ln Lhls way you can
(Lemporarlly) puL a copy ln /user/fLp/pub/1M lor more permanenL
soluLlons ask Lmma 1he mosL lmporLanL commands wlLhln fLp are get for
geLLlng flles from Lhe remoLe machlne and put for puLLlng Lhem Lhere
(get and put leL you speclfy more Lhan one flle aL once) Sounds
sLralghLforward buL be sure noL Lo confuse Lhe Lwo especlally when your
physlcal locaLlon doesnL correspond Lo Lhe dlrecLlon of Lhe fLp connecLlon
youre maklng fLp [usL overwrlLes flles wlLh Lhe same fllename lf youre
Lransferrlng anyLhlng oLher Lhan ASCll LexL use blnary mode
O nx leLs you browse Lhe web from an ordlnary Lermlnal Cf course you can
see only Lhe LexL noL Lhe plcLures ?ou can Lype any u8L as an argumenL Lo
Lhe command When youre dolng Lhls from any SLanford hosL you can leave
ouL Lhe tanfreu parL of Lhe u8L when connecLlng Lo SLanford u8Ls
1ype n aL any Llme Lo learn more abouL nx and Lo exlL
iscellaneous tools
O ebterr looks up Lhe word ln an elecLronlc verslon of WebsLers
dlcLlonary and reLurns Lhe deflnlLlon(s)
O ate shows Lhe currenL daLe and Llme
O ca shows a calendar of Lhe currenL monLh use eg cal 10 1993 Lo geL
LhaL for CcLober 93 or cal 1993 Lo geL Lhe whole year
?ou can flnd ouL more abouL Lhese commands by looklng up Lhelr manpages
annmmonnome shows you Lhe manual page for Lhe command
For Iurther ways oI obtaining help, look at the pages with electronic sources oI
inIormation and non-electronic sources.














ore UNIX Commands
oveootlceJtotteovetwelmloqmojotltyofvlsltotscometotlsoqevloo
ycosseotc@lsoqelstobobly&oot&wotyootelookloqfotseetelloksotte
bottomoftlsoqefotmoteosefollofotmotloo!
O jobs llsLs your currenLly acLlve [obs (Lhose LhaL you puL ln Lhe background)
and Lhelr [ob numbers useful Lo deLermlne whlch one you wanL Lo
foreground lf you have loLs of Lhem
O bg background a [ob afLer suspendlng lL
O fg %jobnumber foreground a [ob
O !! repeaL Lhe prevlous command (buL CTRL-p ls safer because you have hlL
reLurn ln addlLlon)
O !5,99ern repeaL Lhe lasL command LhaL sLarLs wlLh otteto
O echo $'# shows Lhe value of an envlronmenL varlable
O setenv leLs you seL envlronmenL varlables lor example lf you Lyped a
wrong value for Lhe TERM varlable when logglng ln you donL have Lo log ouL
and sLarL over buL you can [usL do setenv TERM vt100 (or whaLever) 1o see
whaL all your envlronmenL varlables are seL Lo Lype env 1he one LhaL youre
mosL llkely Lo have Lo seL ls Lhe DISPLAYvarlable when uslng an xdlsplay
O :nset '# leLs you unseL envlronmenL varlables useful for example lf
youve usually seL ,:tologo:t buL wanL Lo sLay logged on for a whlle wlLhouL
Lyplng for some reason or lf you seL Lhe DISPLAY varlable auLomaLlcally buL
wanL Lo avold openlng wlndows for some reason
O so:7ce 1en,me you need Lo source your doLflles afLer maklng changes for
Lhem Lo Lake effecL (or log off and ln agaln)
O lo,/ wlll show you Lhe load average graphlcally
O spell 1en,me wlll check Lhe spelllng ln your flle lf youre runnlng lL on a
La1ex flle use Lhe -T opLlon Lo Lell lL Lo lgnore Lhe La1ex commands ?ou can
creaLe and use your own dlcLlonary Lo avold havlng lL Lell you LhaL your own
name Lhose of fellow llngulsLs and llngulsLlcs Lermlnology are a Lypos ln every
paper you wrlLe
O eblnt checks Lhe synLax of hLml flles
O l,tex2html LranslaLes La1ex flles lnLo P1ML
O n ord o59on leLs you access Lhe WordneL daLabase and dlsplay for
example synonyms hypernyms or hyponyms dependlng on Lhe opLlon you
selecL
ommand editing in the tcsh
ese tings are te same as in emacs:
,cksp,ce deleLe prevlous characLer
CTRL-/ deleLe nexL characLer
CTRL-k deleLe resL of llne
CTRL-, go Lo sLarL of llne
CTRL-e go Lo end of llne
CTRL-b go backwards wlLhouL deleLlng
CTRL-f go forward wlLhouL deleLlng
ter useful tings
TA compleLe fllename or command up Lo Lhe polnL of unlqueness
CTRL-: cancel whole llne
CTRL-p show Lhe lasL command Lyped Lhen Lhe one before LhaL eLc
(you can also use Lhe cursor up key for Lhls)
CTRL-n go forwards ln Lhe hlsLory of commands
(you can also use Lhe cursor down key for Lhls)
CTRL-c cancel Lhe processes afLer lL has sLarLed
CTRL-z suspend a runnlng process (eg ln order Lo do someLhlng else ln beLween)
you can Lhen puL Lhe process ln Lhe background wlLh bg
CTRL-l redraws Lhe screen
| (p|p|ng) LeLs you execuLe any number of commands ln a sequence
1he second command wlll be execuLed once Lhe flrsL ls done and so forLh
uslng Lhe prevlous commands ouLpuL as lnpuL ?ou can achleve Lhe same
effecL by puLLlng Lhe ouLpuL ln a flle and glvlng Lhe fllename as an argumenL Lo
Lhe second command buL LhaL would be much more compllcaLed and youd
have Lo remember Lo remove all Lhe [unkflles afLerwards Some examples LhaL
show Lhe usefulness of Lhls
ls | mo7e wlll show you one screenful aL a Llme whlch ls useful wlLh any
command LhaL wlll produce a loL of ouLpuL eg also ps -,:x
m,n ls | g7ep tme checks wheLher Lhe man page for ls has someLhlng Lo
say abouL llsLlng flles by Llme very useful when you have a susplclon some
command may be capable of dolng whaL you wanL buL you arenL sure
ls -lR | g7ep /v wlll show you all your dvl flles useful Lo solve dlsk
space problems slnce Lheyre large and usually can be deleLed
$ome policies on turing
ter UNIX pages

Anda mungkin juga menyukai