我是靠谱客的博主 玩命发夹,最近开发中收集的这篇文章主要介绍Unix Cheat Sheet (Unix Linux 命令行参考手册)Unix Cheat Sheet,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Unix Cheat Sheet


http://www.rain.org/~mkummel<wbr></wbr>/unix.html

People who use Windows without DOS, or a Macintosh, or PPP without a terminal, or an ISP's menu without the Unix prompt are at a disadvantage. Something is happening, and they don't know what it is. I like to know what's really going on, so I've been learning some Unix.

The Net is a Unix place. I'm no wizard, but I'm comfortable with basic commands and occasionally type "rm" at my DOS prompt instead of "del". This is my Unix cheat sheet, so I can remember. Uppercase and lowercase matter. These commands (mostly) work with my C-shell account on RAIN. Your account might be different, especially if your prompt ends with a "$" (Korn shell) rather than a "%", so be cautious. When I need help, I reach for the books UNIX in a Nutshell (O'Reilly) and Unix Unbound by Harley Hahn (Osborne/McGraw Hill, 1994).

This page won't look right without table support. Most of this is available in a text version.


Help on any Unix command. RTFM!

man {command}Type man ls to read the manual for the ls command.

man {command} > {filename}Redirect help to a file to download.

whatis {command}Give short description of command. (Not on RAIN?) <!-- D(["mb","u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>apropos {keyword}u003c/tt>u003c/td>u003ctd>Search for all Unix commands that match keyword, eg u003cb>apropos fileu003c/b>. (Not on RAIN?)u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">List a directoryu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ls {path}u003c/tt>u003c/td>u003ctd>It&#39;s ok to combine attributes, eg u003cb>ls -laFu003c/b> gets a long listing of all files with types.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ls {path_1} {path_2}u003c/tt>u003c/td>u003ctd>List both {path_1} and {path_2}.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ls -l {path}u003c/tt>u003c/td>u003ctd>Long listing, with date, size and permisions.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ls -a {path}u003c/tt>u003c/td>u003ctd>Show all files, including important .dot files that don&#39;t otherwise show.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ls -F {path}u003c/tt>u003c/td>u003ctd>Show type of each file. &quot;u003cb>/u003c/b>&quot; u003d directory, &quot;u003cb>*u003c/b>&quot; u003d executable.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ls -R {path}u003c/tt>u003c/td>u003ctd>Recursive listing, with all subdirs.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ls {path} &gt; {filename}u003c/tt>u003c/td>u003ctd>Redirect directory to a file.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ls {path} | moreu003c/tt>u003c/td>u003ctd>Show listing one screen at a time.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>dir {path}u003c/tt>u003c/td>u003ctd>Useful alias for DOS people, or use with u003cb>ncftpu003c/b>.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Change to directoryu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cd {dirname}u003c/tt>u003c/td>u003ctd>There must be a space between.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cd ~u003c/tt>u003c/td>u003ctd>Go back to home directory, useful if you&#39;re lost.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cd ..u003c/tt>u003c/td>u003ctd>Go back one directory.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cdupu003c/tt>u003c/td>u003ctd>Useful alias, like &quot;cd ..&quot;, or use with u003cb>ncftpu003c/b>.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Make a new directoryu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>",1] ); //-->

apropos {keyword}Search for all Unix commands that match keyword, eg apropos file. (Not on RAIN?)

List a directory

ls {path}It's ok to combine attributes, eg ls -laF gets a long listing of all files with types.

ls {path_1} {path_2}List both {path_1} and {path_2}.

ls -l {path}Long listing, with date, size and permisions.

ls -a {path}Show all files, including important .dot files that don't otherwise show.

ls -F {path}Show type of each file. "/" = directory, "*" = executable.

ls -R {path}Recursive listing, with all subdirs.

ls {path} > {filename}Redirect directory to a file.

ls {path} | moreShow listing one screen at a time.

dir {path}Useful alias for DOS people, or use with ncftp.

Change to directory

cd {dirname}There must be a space between.

cd ~Go back to home directory, useful if you're lost.

cd ..Go back one directory.

cdupUseful alias, like "cd ..", or use with ncftp.

Make a new directory

<!-- D(["mb","u003ctt>mkdir {dirname}u003c/tt>u003c/td>u003ctd>u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Remove a directoryu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>rmdir {dirname}u003c/tt>u003c/td>u003ctd>Only works if {dirname} is empty.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>rm -r {dirname}u003c/tt>u003c/td>u003ctd>Remove all files and subdirs. Careful!u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Print working directoryu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>pwdu003c/tt>u003c/td>u003ctd>Show where you are as full path. Useful if you&#39;re lost or exploring.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Copy a file or directoryu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cp {file1} {file2}u003c/tt>u003c/td>u003ctd>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cp -r {dir1} {dir2}u003c/tt>u003c/td>u003ctd>Recursive, copy directory and all subdirs.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cat {newfile} &gt;&gt; {oldfile}u003c/tt>u003c/td>u003ctd>Append newfile to end of oldfile.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Move (or rename) a fileu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>mv {oldfile} {newfile}u003c/tt>u003c/td>u003ctd>Moving a file and renaming it are the same thing.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>mv {oldname} {newname}u003c/tt>u003c/td>u003ctd>u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Delete a fileu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>rm {filespec}u003c/tt>u003c/td>u003ctd>u003cb>?u003c/b> and u003cb>*u003c/b> wildcards work like DOS should. &quot;?&quot; is any character; &quot;*&quot; is any string of characters.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ls {filespec}u003cbr>rm {filespec}u003c/tt>u003c/td>u003ctd>Good strategy: first list a group to make sure it&#39;s what&#39;s you think...u003cbr>...then delete it all at once.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"2">u003cfont sizeu003d"+1">Download with zmodemu003c/font>u003c/td>u003ctd>(Use u003cb>sxu003c/b> with xmodem.)u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>sz [-a|b] {filename}",1] ); //--> mkdir {dirname}

Remove a directory

rmdir {dirname}Only works if {dirname} is empty.

rm -r {dirname}Remove all files and subdirs. Careful!

Print working directory

pwdShow where you are as full path. Useful if you're lost or exploring.

Copy a file or directory

cp {file1} {file2}

cp -r {dir1} {dir2}Recursive, copy directory and all subdirs.

cat {newfile} >> {oldfile}Append newfile to end of oldfile.

Move (or rename) a file

mv {oldfile} {newfile}Moving a file and renaming it are the same thing.

mv {oldname} {newname}

Delete a file

rm {filespec} ? and * wildcards work like DOS should. "?" is any character; "*" is any string of characters.

ls {filespec}
rm {filespec}
Good strategy: first list a group to make sure it's what's you think...
...then delete it all at once.

Download with zmodem(Use sx with xmodem.)

sz [-a|b] {filename} <!-- D(["mb","u003c/tt>u003c/td>u003ctd>u003cb>-au003c/b> u003d ascii, u003cb>-bu003c/b> u003d binary. Use binary for everything. (It&#39;s the default?)u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>sz *.zipu003c/tt>u003c/td>u003ctd>Handy after downloading with FTP. Go talk to your spouse while it does it&#39;s stuff.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"2">u003cfont sizeu003d"+1">Upload with zmodemu003c/font>u003c/td>u003ctd>(Use u003cb>rxu003c/b> with xmodem.)u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>rz [-a|b] (filename}u003c/tt>u003c/td>u003ctd>Give u003cb>rzu003c/b> command in Unix, THEN start upload at home. Works fine with multiple files.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">View a text fileu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>more {filename}u003c/tt>u003c/td>u003ctd>View file one screen at a time.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>less {filename}u003c/tt>u003c/td>u003ctd>Like u003cb>moreu003c/b>, with extra features.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cat {filename}u003c/tt>u003c/td>u003ctd>View file, but it scrolls.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cat {filename} | moreu003c/tt>u003c/td>u003ctd>View file one screen at a time.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>page {filename}u003c/tt>u003c/td>u003ctd>Very handy with u003cb>ncftpu003c/b>.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>pico {filename}u003c/tt>u003c/td>u003ctd>Use text editor and don&#39;t save.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Edit a text file.u003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>pico {filename}u003c/tt>u003c/td>u003ctd>The same editor PINE uses, so you already know it. u003cb>viu003c/b> and u003cb>emacsu003c/b> are also available.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Create a text file.u003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>cat &gt; {filename}u003c/tt>u003c/td>u003ctd>Enter your text (multiple lines with u003cb>enteru003c/b> are ok) and press u003cb>control-du003c/b> to save.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>pico {filename}u003c/tt>u003c/td>u003ctd>Create some text and save it.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Compare two filesu003c/font>",1] ); //--> -a = ascii, -b = binary. Use binary for everything. (It's the default?)

sz *.zipHandy after downloading with FTP. Go talk to your spouse while it does it's stuff.

Upload with zmodem(Use rx with xmodem.)

rz [-a|b] (filename}Give rz command in Unix, THEN start upload at home. Works fine with multiple files.

View a text file

more {filename}View file one screen at a time.

less {filename}Like more, with extra features.

cat {filename}View file, but it scrolls.

cat {filename} | moreView file one screen at a time.

page {filename}Very handy with ncftp.

pico {filename}Use text editor and don't save.

Edit a text file.

pico {filename}The same editor PINE uses, so you already know it. vi and emacs are also available.

Create a text file.

cat > {filename}Enter your text (multiple lines with enter are ok) and press control-d to save.

pico {filename}Create some text and save it.

Compare two files <!-- D(["mb","u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>diff {file1} {file2}u003c/tt>u003c/td>u003ctd>Show the differences.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>sdiff {file1} {file2}u003c/tt>u003c/td>u003ctd>Show files side by side.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Other text commandsu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>grep &#39;{pattern}&#39; {file}u003c/tt>u003c/td>u003ctd>Find regular expression in file.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>sort {file1} &gt; {file2}u003c/tt>u003c/td>u003ctd>Sort file1 and save as file2.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>sort -o {file} {file}u003c/tt>u003c/td>u003ctd>Replace file with sorted version.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>spell {file}u003c/tt>u003c/td>u003ctd>Display misspelled words.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>wc {file}u003c/tt>u003c/td>u003ctd>Count words in file.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Find files on systemu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>find {filespec}u003c/tt>u003c/td>u003ctd>Works with wildcards. Handy for snooping.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>find {filespec} &gt; {filename}u003c/tt>u003c/td>u003ctd>Redirect find list to file. Can be big!u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Make an Aliasu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>alias {name} &#39;{command}&#39;u003c/tt>u003c/td>u003ctd>Put the command in &#39;single quotes&#39;. More useful in your u003cb>.cshrcu003c/b> file.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Wildcards and Shortcutsu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>*u003c/tt>u003c/td>u003ctd>Match any string of characters, eg u003cb>page*u003c/b> gets page1, page10, and page.txt.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>?u003c/tt>u003c/td>u003ctd>Match any single character, eg u003cb>page?u003c/b> gets page1 and page2, but not page10.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>[...]u003c/tt>u003c/td>u003ctd>Match any characters in a range, eg u003cb>page[1-3]u003c/b> gets page1, page2, and page3.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>~u003c/tt>u003c/td>u003ctd>Short for your home directory, eg ",1] ); //-->

diff {file1} {file2}Show the differences.

sdiff {file1} {file2}Show files side by side.

Other text commands

grep '{pattern}' {file}Find regular expression in file.

sort {file1} > {file2}Sort file1 and save as file2.

sort -o {file} {file}Replace file with sorted version.

spell {file}Display misspelled words.

wc {file}Count words in file.

Find files on system

find {filespec}Works with wildcards. Handy for snooping.

find {filespec} > {filename}Redirect find list to file. Can be big!

Make an Alias

alias {name} '{command}'Put the command in 'single quotes'. More useful in your .cshrc file.

Wildcards and Shortcuts

*Match any string of characters, eg page* gets page1, page10, and page.txt.

?Match any single character, eg page? gets page1 and page2, but not page10.

[...]Match any characters in a range, eg page[1-3] gets page1, page2, and page3.

~Short for your home directory, eg <!-- D(["mb","u003cb>cd ~u003c/b> will take you home, and u003cb>rm -r ~u003c/b> will destroy it.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>.u003c/tt>u003c/td>u003ctd>The current directory.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>..u003c/tt>u003c/td>u003ctd>One directory up the tree, eg u003cb>ls ..u003c/b>.nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"2">u003cfont sizeu003d"+1">Pipes and Redirectionu003c/font>u003c/td>u003ctd>(You u003cb>pipeu003c/b> a command to another command, and u003cb>redirectu003c/b> it to a file.)u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>{command} &gt; {file}u003c/tt>u003c/td>u003ctd>Redirect output to a file, eg u003cb>ls &gt; list.txtu003c/b> writes directory to file.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>{command} &gt;&gt; {file}u003c/tt>u003c/td>u003ctd>Append output to an existing file, eg u003cb>cat update &gt;&gt; archiveu003c/b> adds update to end of archive.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>{command} &lt; {file}u003c/tt>u003c/td>u003ctd>Get input from a file, eg u003cb>sort &lt; file.txtu003c/b>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>{command} &lt; {file1} &gt; {file2}u003c/tt>u003c/td>u003ctd>Get input from u003ctt>file1u003c/tt>, and write to u003ctt>file2u003c/tt>, eg u003cb>sort &lt; old.txt &gt; new.txtu003c/b> sorts old.txt and saves as new.txt.nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>{command} | {command}u003c/tt>u003c/td>u003ctd>Pipe one command to another, eg u003cb>ls | moreu003c/b> gets directory and sends it to u003cb>moreu003c/b> to show it one page at a time.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Permissions, important and tricky!u003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd colspanu003d"2">nUnix permissions concern who can u003cb>readu003c/b> a file or directory, u003cb>writeu003c/b> to it, and u003cb>executeu003c/b> it.nPermissions are granted or withheld with a magic 3-digit number.nThe three digits correspond to the u003cb>owneru003c/b> (you); the u003cb>groupu003c/b> (?); and the u003cb>worldu003c/b> (everyone else).u003cp>nThink of each digit as a sum:u003cbr>nu003ctable borderu003d"0" widthu003d"300">nu003ctbody>u003ctr>u003ctd widthu003d"30">u003cbr>u003c/td>u003ctd>execute permission u003c/td>u003ctd>u003d 1u003cbr>u003c/td>nu003c/tr>u003ctr>u003ctd widthu003d"30">u003cbr>u003c/td>u003ctd>write permission u003c/td>u003ctd>u003d 2u003cbr>u003c/td>nu003c/tr>u003ctr>u003ctd widthu003d"30">u003cbr>u003c/td>u003ctd>",1] ); //--> cd ~ will take you home, and rm -r ~ will destroy it.

.The current directory.

..One directory up the tree, eg ls ...

Pipes and Redirection(You pipe a command to another command, and redirect it to a file.)

{command} > {file}Redirect output to a file, eg ls > list.txt writes directory to file.

{command} >> {file}Append output to an existing file, eg cat update >> archive adds update to end of archive.

{command} < {file}Get input from a file, eg sort < file.txt

{command} < {file1} > {file2}Get input from file1, and write to file2, eg sort < old.txt > new.txt sorts old.txt and saves as new.txt.

{command} | {command}Pipe one command to another, eg ls | more gets directory and sends it to more to show it one page at a time.

Permissions, important and tricky!

Unix permissions concern who can read a file or directory, write to it, and execute it. Permissions are granted or withheld with a magic 3-digit number. The three digits correspond to the owner (you); the group (?); and the world (everyone else).

Think of each digit as a sum:


execute permission = 1

write permission = 2

<!-- D(["mb","write and execute (1+2)u003c/td>u003ctd>u003d 3 u003cbr>u003c/td>nu003c/tr>u003ctr>u003ctd widthu003d"30">u003cbr>u003c/td>u003ctd>read permission u003c/td>u003ctd>u003d 4u003cbr>u003c/td>nu003c/tr>u003ctr>u003ctd widthu003d"30">u003cbr>u003c/td>u003ctd>read and execute (4+1)u003c/td>u003ctd>u003d 5u003cbr>u003c/td>nu003c/tr>u003ctr>u003ctd widthu003d"30">u003cbr>u003c/td>u003ctd>read and write (4+2)u003c/td>u003ctd>u003d 6u003cbr>u003c/td>nu003c/tr>u003ctr>u003ctd widthu003d"30">u003cbr>u003c/td>u003ctd>read, write and execute (4+2+1)u003c/td>u003ctd>u003d 7u003cbr>u003c/td>nu003c/tr>u003c/tbody>u003c/table>nu003c/p>u003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd colspanu003d"2">Add the number value of the permissions you want to grant each group to make a three digit number, none digit each for the owner, the group, and the world. Here are some useful combinations. Try to figure them out!u003cp>nu003c/p>u003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>chmod 600 {filespec}u003c/tt>u003c/td>u003ctd>You can read and write; the world can&#39;t. Good for files.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>chmod 700 {filespec}u003c/tt>u003c/td>u003ctd>You can read, write, and execute; the world can&#39;t. Good for scripts.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>chmod 644 {filespec}u003c/tt>u003c/td>u003ctd>You can read and write; the world can only read. Good for web pages.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>chmod 755 {filespec}u003c/tt>u003c/td>u003ctd>You can read, write, and execute; the world can read and execute. Good for programs you want to share, and your u003ctt>public_htmlu003c/tt> directory.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Permissions, another wayu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd colspanu003d"2">nYou can also change file permissions with letters:u003cp>nu003ctable borderu003d"0" widthu003d"400">n u003ctbody>u003ctr>u003ctd widthu003d"30">u003cbr>u003c/td>u003ctd>u003cb>uu003c/b> u003d user (yourself) u003c/td>u003ctd>u003cb>gu003c/b> u003d group u003c/td>u003ctd>u003cb>au003c/b> u003d everyoneu003cbr>u003c/td>n u003c/tr>u003ctr>u003ctd widthu003d"30">u003cbr>u003c/td>u003ctd>u003cb>ru003c/b> u003d read u003c/td>u003ctd>u003cb>wu003c/b> u003d write u003c/td>u003ctd>u003cb>xu003c/b> u003d executeu003cbr>u003c/td>nu003c/tr>u003c/tbody>u003c/table>nu003c/p>u003cp>nu003c/p>u003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>chmod u+rw {filespec}u003c/tt>u003c/td>u003ctd>Give yourself read and write permissionu003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>chmod u+x {filespec}u003c/tt>u003c/td>u003ctd>Give yourself execute permission.",1] ); //--> write and execute (1+2)= 3

read permission = 4

read and execute (4+1)= 5

read and write (4+2)= 6

read, write and execute (4+2+1)= 7

Add the number value of the permissions you want to grant each group to make a three digit number, one digit each for the owner, the group, and the world. Here are some useful combinations. Try to figure them out!


chmod 600 {filespec}You can read and write; the world can't. Good for files.

chmod 700 {filespec}You can read, write, and execute; the world can't. Good for scripts.

chmod 644 {filespec}You can read and write; the world can only read. Good for web pages.

chmod 755 {filespec}You can read, write, and execute; the world can read and execute. Good for programs you want to share, and your public_html directory.

Permissions, another way

You can also change file permissions with letters:


u = user (yourself) g = group a = everyone

r = read w = write x = execute


chmod u+rw {filespec}Give yourself read and write permission

chmod u+x {filespec}Give yourself execute permission. <!-- D(["mb","u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>chmod a+rw {filespec}u003c/tt>u003c/td>u003ctd>Give read and write permission to everyone.u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">Applications I useu003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>finger {userid}u003c/tt>u003c/td>u003ctd>Find out what someone&#39;s up to.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>gopheru003c/tt>u003c/td>u003ctd>Gopher.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ircu003c/tt>u003c/td>u003ctd>IRC, but not available on RAIN.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>lynxu003c/tt>u003c/td>u003ctd>Text-based Web browser, fast and lean.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ncftpu003c/tt>u003c/td>u003ctd>Better FTP.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>pico {filename}u003c/tt>u003c/td>u003ctd>Easy text editor, but limited. u003cb>viu003c/b> and u003cb>emacsu003c/b> are available.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>pineu003c/tt>u003c/td>u003ctd>Email.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>telnet {host}u003c/tt>u003c/td>u003ctd>Start Telnet session to another host.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>tinu003c/tt>u003c/td>u003ctd>Usenet.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>uudecode {filename}u003cbr>uuencode {filename}u003c/tt>u003c/td>u003ctd>Do it on the server to reduce download size about 1/3.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>ytalk {userid}u003c/tt>u003c/td>u003ctd>Chat with someone else online, eg u003cb>ytalk mkummelu003c/b>. Please use u003cb>wu003c/b> first so you don&#39;t interrupt a big download!u003cbr>nnu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003chr>nu003c/td>u003c/tr>u003ctr>u003ctd colspanu003d"3">u003cfont sizeu003d"+1">System infou003c/font>u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>dateu003c/tt>u003c/td>u003ctd>Show date and time.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>dfu003c/tt>u003c/td>u003ctd>Check system disk capacity.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>duu003c/tt>u003c/td>u003ctd>Check your disk usage and show bytes in each directory.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>more /etc/motdu003c/tt>u003c/td>u003ctd>Read message of the day, &quot;motd&quot; is a useful alias..u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>printenvu003c/tt>u003c/td>u003ctd>Show all environmental variables (in C-shell% - use u003cb>setu003c/b> in Korn shell$).u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>",1] ); //-->

chmod a+rw {filespec}Give read and write permission to everyone.

Applications I use

finger {userid}Find out what someone's up to.

gopherGopher.

ircIRC, but not available on RAIN.

lynxText-based Web browser, fast and lean.

ncftpBetter FTP.

pico {filename}Easy text editor, but limited. vi and emacs are available.

pineEmail.

telnet {host}Start Telnet session to another host.

tinUsenet.

uudecode {filename}
uuencode {filename}
Do it on the server to reduce download size about 1/3.

ytalk {userid}Chat with someone else online, eg ytalk mkummel. Please use w first so you don't interrupt a big download!

System info

dateShow date and time.

dfCheck system disk capacity.

duCheck your disk usage and show bytes in each directory.

more /etc/motdRead message of the day, "motd" is a useful alias..

printenvShow all environmental variables (in C-shell% - use set in Korn shell$).

<!-- D(["mb","u003ctt>quota -vu003c/tt>u003c/td>u003ctd>Check your total disk use.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>uptimeu003c/tt>u003c/td>u003ctd>Find out system load.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>u003cbr>u003c/td>u003ctd>u003ctt>wu003c/tt>u003c/td>u003ctd>Who&#39;s online and what are they doing?u003cbr>nu003c/td>u003c/tr>u003c/tbody>u003c/table>nnu003chr>nu003cfont sizeu003d"+1">Unix Directory Formatu003c/font>u003cp>nu003c/p>u003cblockquote>nLong listings (u003cb>ls -lu003c/b>) have this format:u003cp>nu003c/p>u003cpre>u003ctt>u003cbr> u003cb>-u003c/b> fileu003cbr> u003cb>du003c/b> directory, u003cb>*u003c/b> executableu003cbr> ^ symbolic links (?) file size (bytes) file name u003cb>/u003c/b> directoryu003cbr> ^ ^ ^ ^ ^nu003cbr> u003cb>drwxr-xr-x 11 mkummel 2560 Mar 7 23:25 public_html/u003cbr> -rw-r--r-- 1 mkummel 10297 Mar 8 23:42 index.htmlu003c/b>u003cbr> ^u003cbr> ^^^ user permission (rwx) date and time last modifiednu003cbr> ^^^ group permission (rwx)u003cbr> ^^^ world permission (rwx)u003cbr>u003c/tt>u003c/pre>nu003c/blockquote>nnu003chr>nu003cfont sizeu003d"+1">How to Make an Aliasu003c/font>u003cp>nu003c/p>u003cblockquote>nAn alias lets you type something simple and do something complex. It&#39;s a shorthand for a command.nIf you want to type &quot;dir&quot; instead of &quot;ls -l&quot; then type u003cb>alias dir &#39;ls -l&#39;u003c/b>. The single quotes tellnUnix that the enclosed text is one command.nu003cp>nAliases are more useful if they&#39;re permanent so you don&#39;t have to think about them. You can do this by nadding the alias to your u003cb>.cshrcu003c/b> file so they&#39;re automatically loaded when you start. nType u003cb>pico .cshrcu003c/b> and look for the alias section and add what you want.nIt will be effective when you start. nJust remember that if you make an alias with the name of a Unix command, that command will become unavailable.nu003c/p>u003cp>nHere are a few aliases from my u003cb>.cshrcu003c/b> file:nu003c/p>u003cp>nu003c/p>u003cpre> # enter your aliases here in the form:u003cbr>t # alias this means thisu003cbr>u003cbr> alias h history u003cbr> alias m more",1] ); //--> quota -v Check your total disk use.

uptimeFind out system load.

wWho's online and what are they doing?

Unix Directory Format

Long listings ( ls -l) have this format:


- file
d directory, * executable
^ symbolic links (?) file size (bytes) file name / directory
^ ^ ^ ^ ^

drwxr-xr-x 11 mkummel 2560 Mar 7 23:25 public_html/
-rw-r--r-- 1 mkummel 10297 Mar 8 23:42 index.html

^
^^^ user permission (rwx) date and time last modified

^^^ group permission (rwx)
^^^ world permission (rwx)

How to Make an Alias

An alias lets you type something simple and do something complex. It's a shorthand for a command. If you want to type "dir" instead of "ls -l" then type alias dir 'ls -l'. The single quotes tell Unix that the enclosed text is one command.

Aliases are more useful if they're permanent so you don't have to think about them. You can do this by adding the alias to your .cshrc file so they're automatically loaded when you start. Type pico .cshrc and look for the alias section and add what you want. It will be effective when you start. Just remember that if you make an alias with the name of a Unix command, that command will become unavailable.

Here are a few aliases from my .cshrc file:

            # enter your aliases here in the form:
# alias this means this

alias h history
alias m more<!-- D(["mb","u003cbr> aliastqtquota -vnu003cbr> alias bye exitu003cbr> alias tls tls -Fu003cbr> alias dir lsu003cbr> alias tcduptcd ..u003cbr> aliastmotdtmore /etc/motdu003cbr>u003cbr>u003c/pre>nu003c/blockquote>nnu003chr>nu003cfont sizeu003d"+1">How to Make a Scriptu003c/font>u003cp>nu003c/p>u003cblockquote>nA Unix script is a text file of commands that can be executed, like a u003cb>.batu003c/b> file in DOS. nUnix contains a powerful programming language with loops and variables that I don&#39;t really understand. nHere&#39;s a useful example.nu003cp>nUnix can&#39;t rename a bunch of files at once the way DOS can. nThis is a problem if you develop Web pages on a DOS machine and then upload them to your Unix Server.nYou might have a bunch of u003cb>.htmu003c/b> files that you want to rename as u003cb>.htmlu003c/b> files, nbut Unix makes you do it one by one. This is actually not a defect. (It&#39;s a feature!) nUnix is just being more consistent than DOS. So make a script!nu003c/p>u003cp>nMake a text file (eg with u003cb>picou003c/b>) with the following lines. The first line is special. It tellsnUnix what program or shell should execute the script. Other # lines are comments.nu003c/p>u003cpre> #! /bin/cshu003cbr> # htm2html converts *.htm files to *.htmlu003cbr> foreach f ( *.htm )u003cbr> set baseu003d`basename $f .htm`u003cbr> mv $f $base.htmlu003cbr> endu003cbr>u003c/pre>nSave this in your home directory as u003cb>htm2htmlu003c/b> (or whatever). nThen make it user-executable by typing u003cstrong>chmod 700 htm2htmlu003c/strong>.nAfter this a u003cb>*u003c/b> will appear by the file name when you u003cb>ls -Fu003c/b>, to show that it&#39;s executable. Change to na directory with u003cb>.htmu003c/b> files and type u003cb>~/htm2htmlu003c/b>, and it will do its stuff.nu003cp>nThink about scripts whenever you find yourself doing the same tedious thing over and over.nu003c/p>u003c/blockquote>nnu003chr>nu003cfont sizeu003d"+1">Dotfiles (aka Hidden Files)u003c/font>u003cp>nu003c/p>u003cblockquote>nu003cb>Dotfileu003c/b> names begin with a &quot;.&quot; These files and directories don&#39;t show up when you list a directory unless younuse the u003cb>-au003c/b> option, so they are also called ",1] ); //-->
alias q quota -v

alias bye exit
alias ls ls -F
alias dir ls
alias cdup cd ..
alias motd more /etc/motd


How to Make a Script

A Unix script is a text file of commands that can be executed, like a .bat file in DOS. Unix contains a powerful programming language with loops and variables that I don't really understand. Here's a useful example.

Unix can't rename a bunch of files at once the way DOS can. This is a problem if you develop Web pages on a DOS machine and then upload them to your Unix Server. You might have a bunch of .htm files that you want to rename as .html files, but Unix makes you do it one by one. This is actually not a defect. (It's a feature!) Unix is just being more consistent than DOS. So make a script!

Make a text file (eg with pico) with the following lines. The first line is special. It tells Unix what program or shell should execute the script. Other # lines are comments.

    #! /bin/csh
# htm2html converts *.htm files to *.html
foreach f ( *.htm )
set base=`basename $f .htm`
mv $f $base.html
end
Save this in your home directory as htm2html (or whatever). Then make it user-executable by typing chmod 700 htm2html. After this a * will appear by the file name when you ls -F, to show that it's executable. Change to a directory with .htm files and type ~/htm2html, and it will do its stuff.

Think about scripts whenever you find yourself doing the same tedious thing over and over.


Dotfiles (aka Hidden Files)

Dotfile names begin with a "." These files and directories don't show up when you list a directory unless you use the -a option, so they are also called <!-- D(["mb","u003cb>hidden filesu003c/b>. nType u003cb>ls -lau003c/b> in your home directory to see what you have.nu003cp>nSome of these dotfiles are crucial. They initialize your shell and the programs you use,nlike u003cb>autoexec.batu003c/b> in DOS and u003cb>.iniu003c/b> files in Windows. nu003cb>rcu003c/b> means &quot;run commands&quot;. These are all text files that can be edited, but change them at your peril. nMake backups first!nu003c/p>u003cp>nHere&#39;s some of what I get when I type u003cb>ls -laFu003c/b>:u003c/p>u003cp>nu003ctable borderu003d"0" widthu003d"500">nu003ctbody>u003ctr>u003ctd>.addressbook u003c/td>u003ctd>my email addressbook.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.cshrc u003c/td>u003ctd>my C-shell startup info, important!u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.gopherrc u003c/td>u003ctd>my u003cb>gopheru003c/b> setup.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.history u003c/td>u003ctd>list of past commands.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.login u003c/td>u003ctd>login init, important!u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.lynxrc u003c/td>u003ctd>my u003cb>lynxu003c/b> setup for WWW.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.ncftp/ u003c/td>u003ctd>hidden dir of u003cb>ncftpu003c/b> stuff.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.newsrc u003c/td>u003ctd>my list of subscribed newsgroups.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.pinerc u003c/td>u003ctd>my u003cb>pineu003c/b> setup for email.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.plan u003c/td>u003ctd>text appears when I&#39;m u003cb>fingeredu003c/b>, ok to edit.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.profile u003c/td>u003ctd>Korn shell startup info, important!u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.project u003c/td>u003ctd>text appears when I&#39;m u003cb>fingeredu003c/b>, ok to edit.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.signature u003c/td>u003ctd>my signature file for mail and news, ok to edit.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.tin/ u003c/td>u003ctd>hidden dir of my u003cb>tinu003c/b> stuff for usenet.u003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>.ytalkrc u003c/td>u003ctd>my u003cb>ytalku003c/b> setup.u003cbr>nu003c/td>u003c/tr>u003c/tbody>u003c/table>nu003c/p>u003c/blockquote>nnu003chr>nu003cfont sizeu003d"+1">DOS and UNIX commandsu003c/font>u003cp>nu003c/p>nnu003ctable borderu003d"0" widthu003d"500">u003ctbody>u003ctr alignu003d"left">u003cth>Actionu003c/th>u003cth>DOSu003c/th>u003cth>UNIXu003cbr>nu003c/th>u003c/tr>u003ctr>u003ctd>change directoryu003c/td>u003ctd>cdu003c/td>u003ctd>cdu003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>change file protectionu003c/td>u003ctd>attribu003c/td>u003ctd>chmodu003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>compare filesu003c/td>u003ctd>compu003c/td>u003ctd>diffu003cbr>nu003c/td>u003c/tr>u003ctr>u003ctd>copy fileu003c/td>u003ctd>copyu003c/td>u003ctd>",1] ); //--> hidden files. Type ls -la in your home directory to see what you have.

Some of these dotfiles are crucial. They initialize your shell and the programs you use, like autoexec.bat in DOS and .ini files in Windows. rc means "run commands". These are all text files that can be edited, but change t

最后

以上就是玩命发夹为你收集整理的Unix Cheat Sheet (Unix Linux 命令行参考手册)Unix Cheat Sheet的全部内容,希望文章能够帮你解决Unix Cheat Sheet (Unix Linux 命令行参考手册)Unix Cheat Sheet所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(53)

评论列表共有 0 条评论

立即
投稿
返回
顶部