My personal study notes. Unix Power Tools (3rd Edition)
Ch1
POSIX — Portable Operating System Interface (IEEE standard)
A shell is a command interpreter.
Programs can be strung together in “pipelines” in which the output of one program is used as the input of another
A vertical bar ( | ) represents pipe and means “take the output of the program on the left and feed it into the program on the right."
less -- read its standard input from a pipe and still interact with you at the keyboard. It does that by reading directly from your tty.
exception (Emacs) — once it starts, the editor works independently of the shell, reading its input and output directly from the terminal.
Traditionally, a command interpreter is called a “shell”, it’s just another program.
………………….
The Mac uses a carriage return ASCII character 015 to mark the end of each line, while Unix uses a linefeed (ASCII 012). As a result, with Unix, the file looks like one long paragraph, with no ned in sight.
tr can convert every occurrence of one character in a file to another:
tr ‘\015’ ‘\012’ <file.mac >file.unix
…………………...
a basic for loop
for x
do
echo "Converting $x"
tr ‘\015’ ‘\012’ <“$x” > “tmp.$x"
mv “tmp.$x” “$x"
……………………...
The search path: a list of directories that the shell should look through for a command whose name matches what is typed. The search path isn’t built into the shell, you specify in your shell setup files.
PATH —an environment variable
……………..
The kernel is the heart of the Unix OS itself.
The kernel assigns memory to each of the programs that are running, partitions time fairly so that each program can get its job done, handles all I/O operations, etc.
daemons— are the system’s “helpers”, they run continuously, or from time to time— small but important tasks like handling mail, running network communications, feeding data to your printer.
ps x —— get a list of all processes running on your system
ps aux —— see everything that’s running, including the deamons (or ps -el)
to turn off a UNIX, first run shutdown
when turning on a Unix machine, it runs fsck (file system disk check) first
………………….
ls -a
lists files including those names start with a .
Unix OS doesn’t consider . in a file name
in Unix, rm * is very dangerous, it deletes everything under the current directory
in other OS, you need to say *.* to refer to all files
…………………..
Wildcard
? matches a single character
* matches zero or more characters
[character-list] matches any single character that appears in the list.
[a-zA-Z] means any alphabetic English character
Wildcards never match / , which is both the name of the filesystem root, and the character used to separate directory names in a path. The only way to match is to escape it (\)
……………………….
hierarchical file system (tree structured)
A directory is a special kind of file that lists a bunch of other files. A directory can contain any number of files (try to keep it under 100 though). A directory can also contain other directories.
At the top, is the directory called “root” , which has the special name /
/home home directory
/etc has configuration files
pwd —print working directory (to find out your current directory)
path begins with /, it is an absolution path.
./textfile can also execute the file if it is given executable file permissions
………………………..
File Access Permissions
The user entry in the master password file /etc/passwd defines his “primary group membership"
The /etc/group file defines the groups that are available and can also assign other users to these groups as needed.
Every file belongs one user and one group.
As the file owner, you can use chgrp to change the file’s group.
Use chown to change the file’s owner.
Nine mode bits
3 groups, owner, a member of the file’s group, or other <read, write or execute>
…………………….
In general, a process is a program that’s running.
To become the superuser, you can either log in as root or use the su command
……………..Files……………..
The structures of a file is defined by the program who uses it, not by the Unix OS.
Unix programs abide by one convention. Text files uses a single newline character (linefeed) between lines of text, rather than the carriage return-linefeed combination used in Windows or the carriage returns used in the Macintosh. This difference may cause problems when you bring files from other OS over to Unix. Windows files will often be littered with carriage returns (Ctrl-M), which are necessary for that OS but superfluous for Unix. Mac text files will appear to be one long line with no breaks. Use Unix utilities to convert Mac and Windows files for Unix.
……………….Scripting…………...
Perl, Python and Tcl.
Perl—regular expressions, working with files and other forms of I/O.
Python— more OO and data-manipulation features than the file-manipulation and regular-expression manipulation of Perl.
Tcl— popular with Linux systems. Tk toolkit (GUI library)
………………Unix Networking…………….
The internet — is a worldwide network of computers.
WWW — World Wide Web is a set of information servers on the Internet. The servers are linked into a hypertext web of documents, graphics, sound and more. Your browser turn that hypertext into an easy-to-use Internet interface.
mail
ftp — one way to transfer files between your computer and another computer with TCP/IP.
UUCP —Unix-to-Unix Copy, a family of programs (uucp, uux, uulog, and others)
Usenet — a collection of thousands of computers worldwide that exchange files called news articles.
telnet—This utility logs into a remote computer over a network (such as the Internet) using TCP/IP. You can work on the remote computer as if it were your local computer. telnet can log you into other OS from your Unix host and vice versa.
rsh— “remote shell” to run a command on a remote system w/o needing to log in interactively. Often used to start the “X Window System”
ssh— acts like rsh and rlogin, but it makes a secure encrypted connection to the remote computer.
rcp — “remote cp"
scp — secure version of rcp
NFS— not a user utility. The Network FileSystem and related packages like NIS (Network Information Service) let system administrator mount remote computers’ filesystems onto your local computer.
write — sends msg to another use’s screen.
talk — it splits the screen into two pieces and let users type at the same time if they wish.
irc— Internet Relay Chat allows multiple users to carry on multiple discussions across the Internet and other networks.
Thu, 02 Apr 2020 14:01:33 -0600
<a href="http://www.google.org/love/">this tool</a>
Thu, 02 Apr 2020 14:02:30 -0600
[url=http://www.google.org/google/]this tool[/url]
Thu, 02 Apr 2020 14:03:31 -0600
[this tool](http://www.google.org/tgoogle/)
Thu, 02 Apr 2020 14:04:07 -0600
http://www.google.org/google
Wed, 17 Jun 2020 03:28:58 -0600
This is really informative post, I love to see this post, I am working for Carolina Demolition Services company which provides complete demolition services after property damage and during reconstruction. We handle demolition projects after a fire or water damage has occurred and during structural remodels and additions.
Thu, 22 Sep 2022 21:47:28 -0600
thank you so much for this valuable piece of information it was very helpful for me to know about Unix Power Tools and study nodes they have shared finger joint pain and vital please please include a variety of detailed informations and it features the basic concept and looping of this program has made very helpful for me
Thu, 10 Nov 2022 22:06:14 -0700
There's a lot to learn if you want to become a power user of the Unix operating system. A great place is William E. Upper's excellent book, "Unix Power Tools." In it, you'll find everything from a primer on the Unix command line to in-depth information on the most popular and useful Unix tools. In this series of study notes, we'll take a look at some of the highlights of the book, starting with Chapter 1, "Getting Started with the Unix Shell." In this chapter, Upper explains the basics of the Unix shell, presidential primary a command-line interface that gives you access to the Unix operating system.
Fri, 06 Oct 2023 02:59:46 -0600
Unix Power Tools is a valuable resource for mastering Unix/Linux systems. Chapter 1 likely covers foundational concepts. It's crucial to pay close attention to these basics, as they best place to buy diamond rings form the building blocks for advanced Unix operations. Take detailed notes, as this knowledge will serve as a strong foundation for your Unix journey.