(aka “that black window thingy”) is a window that takes you to unix (text version as many call it), everything is represented as text and text is what you see. It doesn't get any better.
“hours | grep my_user_name_here”
“hours | grep smacdo2 | grep Tuesday”
“more” and “less” come to your rescue! Just type in
"hours | grep smacdo2 | more"
Ta-da!
more
less - "The more powerful version of more"... get it?? ;) grep sort
ls * **List the content of current directory.** So when you type "ls"you should see what is in directory. When you type
"ls -l"
you will see the current directory, with permisions, user who owns it, time modified, size. Just try it “ls -l”. If you need more options type “man ls”.
cd * **Takes you to the directory you point to**. If you are in home directory aka /home/ and you want to go to your name you type "cd foldername" where "foldername" is a folder you want to enter.
To leave the directory back to home you type
"cd .." don't forget the space between "cd" and ".." * Since you get faster at working with them **try these:** "pwd" : (Print Working Directory) Simply spits out the directory you are currently in. "who" tells you who is loged in into the same machine. "write" sends a message to other person. * If your friend user name on Linux is "acmuser". If you type "write acmuser" you can send a message to that person. Your message will be displayed on his screen. You end by pressing Ctrl+C. This is a nice way to bother people lol. Don't tell nobody.
pine (not on all linuxes) is a email program. * It is a simple text email editor. You are able to send, recive, delete email messages recived by your server. (In our case icarus or acm.) This program has also some connection with mime....not sure yet "pico" is a common mail reader on unix systems. * It is a text based system, but has all the trappings and dressings of a modern GUI based mail reader. It can also read your news! "mv " stands for move. * Using mv, you can move files and folders around your computer. Unlike copy, move does not create a copy. Move MOVES the file. Note that this is the DOS equivilant of rename. "rm filename" * removes / deletes a file. "rm * -r" will delete every file in the directory and derectory below it. ALL directories contained within the current directory will be gone. This is very powerful, but can be equated with the "nuclear option"! If you do this as root(THE MASTER OWNER) with your current directory as '/', you will delete your ENTIRE filesystem! :D "rmdir " deletes a directory. * Note that the directory must be empty before you can delete a directory. Commands have their own manual pages. * Simply type in 'man command', except replace command with the command you want to look up.
*Here is how to look for something in unix:
grep is the unix user's most powerful tool.
* It lets you take any form of input passed to it, and use search patterns known as regular expressions to search through the text.
find searches a specified directory, or set of directories to find a file with the specified pattern.
* Here are some examples for using grep
a) cat *.txt | grep termcat ~/code/*.c | grep -n "sprintf"
# Find all lines #s with the occurance of "sprintf" in all c files in your "code" directory
b) ls -al | grep -v ".pl"
# List all files in a directory that do not contain ".pl"
c) cat hello_world.pl | grep "printf" | wc -l
# Count the number of lines "printf" occurs in hello_world.pl
d) env | grep PATH
e) ps aux | grep smacdo2 - shows all processes owned by "smacdo2"
f) w | grep smacdo2 - show all active logins from smacdo2
g) ls -al | grep text
* Here are 5 other combination for find
a) find ./ -name aloe.plant
b) find ~/code/ -name "types.?"
# List all of the files in the code directory named "types" with 1 character as the extension
c) find / -type f | xargs grep -n "strcat(" /dev/null
# Find every file on the computer that contains the word "strcat("
and print out the line number/file which it occurs
d) find /usr/sbin -perm 777
# Find every file in your /usr/sbin directory that is world writeable, readable and executable
e) find /var/backup -newer oldfile
# Find every file in your backup directory that is newer than "oldfile"
* Here are special way of using files with space,$,/ in a name....
To find such a file, you need to escape the characters so that the shell doesn't process them. The way to make sure those characters do not get processed by the shell is to add a \ in front of them. eg: find Hello\ World.txt Same concept applies to many other characters too, including parenthesis & square brackets. /
$ \ space
+ /name does + press 'i' to be in insert (writing) mode + press 'r' to be enter replace mode. Simply highlight the character you want to replace, and then type the character you want it to be replaced by. + esc to leave insert (writing) mode + w ('write') saves your file + q exits + q! will exit without saving changes + You can combine w & q → wq to mean “write, then exit” + u undoes the last command + x will delete the character under your cursor + dd will delete the line under your cursor + other
o was created …
o basic structure is... o sample 10 comands: + anybody used it?
Folder can be ziped by writing
+ tar -czvf new_file_name.tgz folder
# "czvf" compress zip verify files
o Which one of the copresions you use kinda depends on what you value more, time or space. bzip2 will compress more, but takes more time to compress and uncompress then does gzip. You'll sometimes find both avaiable for download (i.e. both a .tar.gz and a .tar.bz2);gzip seem usually the best choice given speed vs. compression ratios. Also, one other format that should be explored is “rzip” and “7z”. o To uncompress: tar -dzvf namesample 10commands are:
o dzvf decompress ziped verify files * What are rpms? RPMs are red hat or other operating system alternative way of installing software. They are supposed to be an easy way to get programs onto linux. The downside is that they are horrible about dependencies. They dont check for any or install any. RPM's are little better than downloading the soure and building it yourself. o Alternatives are apt-get from debian which does do dependencies and is really easy to use, portage from gentoo which is like apt-get to my understanding and ports in BSD which is another way which is almost as easy as debian or gentoo. Which one you can use depends on which distro you have but RPMs pretty much suck. o Redhat uses rpm binaries to install programs. o Gentoo uses scripts (portage) to install from tar balls (source) o debian uses its own binaries called deb files, but better with dependecies than redhat ? Suse uses its own rpms. Not sure how suse handles its dependances.
o You use the make utility. Make automates all the things that you have to do to compile and install a program.
o SpaceyMcCow
o make
o make install
o make clean
+ The initial make compiles it, make install moves everything to the right place
to use it and then make clean cleans up all the extra garbage.
o install does
o ./configure Frequently you have to run ./Configure first which will qualify your OS
and libraries for the software you are compiling. Look at the man page for make.
o Though, you really should try to use whatever package manager your distribution uses
because satisfying dependencies for source installs is a pain. Package managers like
rpm's, .deb's, Debian's apt-get, Gentoo's emerge, etc. are there for that reason
(among a few others). apt-get and emerge are spectacular at handling dependencies.
o To remove you do:
o To add you do o To update you do: * shell is a ... o sh is o bsh o other * SSH is used to o here how its done * ftp is used to ... o here is how its done
o you get it from: http://httpd.apache.org/
o it works this way:
o http.conf is a ...
o update
* to create mail server, you can use several popular email servers, which include sendmail and qmail.
QMail was written by professor Bernstein of UIC. Qmail is widely seen as the more secure alternative to sendmail, but sendmail has more features.
o You find Qmail at www.qmail.org, and http://www.sendmail.org/.
o you configure it ...
o you use it this way..
o you add modifications...
o update
* to create dns server you ...
o you download it ..
o you configure it like..
o modify
o update
o menage
* to create ftp server you...
o do this to apache or
* to create php/mysql
o download this from:
o install
o configure httpd.conf
o secure by..
o Home: http://acm.cs.uic.edu/sigweb/
faq configure install setup howto
Courtesy of ACM