Linux Chapter 7,9 Unit3

In: Computers and Technology

Submitted By Paden
Words 764
Pages 4
1. "Where is date" tells us where the executable file "date" is located, according to the current $PATH value. The result tells us that the executable file "date" is found in /bin 2. echo $PATH tells us what is the content of the $PATH environment parameter. Each path is separated by a colon ":". 3. "cat > date" takes standard input (stdin) from the keyboard and put the keyed in content into a new file in the current directory called date. The input should be terminated by a control-d, which is not mentioned in the question. The file "date" usually has a permission of 644 or 600 (depending on the computer implementation), which means that it is not executable. 4. ./date attempts to execute the file ./date, but it is not executable (by default). Again, depending on the implementation of the system, it may return "permission denied", or possibly search for the next directory from the $PATH environment variable, which outputs the current date and time.

2. You can give the name of the file containing the script as an argument to the shell (for example, bash scriptfile, where scriptfile is the name of the file containing the script).
Under bash, you can give either of the following commands:
$ . scriptfile
$ source scriptfile
Since the shell must read the commands from the file containing a shell script before it can execute the commands, you must have read permission for the file to execute a shell script.

3.
A. yes
B the first one in the PATH variable
C. direct call with pathname e.g. ~/bin/dolt, or ./dolt if you're in ~/bin/
D. PATH=/usr/games:$PATH;

4. Assume that you have made the following assignment:
$ person=jenny
Give the output of each of the following commands:
a. echo $person jenny b. echo '$person'
$person
c. echo "$person" jenny 5.
a) type "chmod +x journal"
b)It reads the name from stdin and cats it to…...

Similar Documents

Linux Chapter 7,9 Unit3

...1. "Where is date" tells us where the executable file "date" is located, according to the current $PATH value. The result tells us that the executable file "date" is found in /bin 2. echo $PATH tells us what is the content of the $PATH environment parameter. Each path is separated by a colon ":". 3. "cat > date" takes standard input (stdin) from the keyboard and put the keyed in content into a new file in the current directory called date. The input should be terminated by a control-d, which is not mentioned in the question. The file "date" usually has a permission of 644 or 600 (depending on the computer implementation), which means that it is not executable. 4. ./date attempts to execute the file ./date, but it is not executable (by default). Again, depending on the implementation of the system, it may return "permission denied", or possibly search for the next directory from the $PATH environment variable, which outputs the current date and time. 2. You can give the name of the file containing the script as an argument to the shell (for example, bash scriptfile, where scriptfile is the name of the file containing the script). Under bash, you can give either of the following commands: $ . scriptfile $ source scriptfile Since the shell must read the commands from the file containing a shell script before it can execute the commands, you must have read permission for the file to execute a shell script. 3. A. yes B the first one in the......

Words: 764 - Pages: 4

Unit3

...Unit III: Chapter 7 Assessment of Learning Guiding Principles in the Assessment of Learning 1. Assessment of learning is an integral part of the teaching-learning process: It is logical to find out how well we have attained our lesson objective, thus we engage ourselves in the process of assessment. What do we do after teaching is determined by the result of assessment. 2. Assessment tool should match with performance objective: The assessment tools that are used to evaluate the students should be aligned with the performance objective you expect from your students so that the assessment will be valid for evaluation purposes. 3. The results of assessment must be fed back to the learners: The main purpose of assessment is to find out how well the learner has attained a particular learning objective. Thus, the results of the assessment should be given to the students so that they’ll be able to know if they are progressing or not. 4. In assessing learning, teachers must consider learners’ ;earning styles and Multiple Intelligences and so must come up with a variety of ways of assessing learning: Educators should consider the different learning styles and multiple intelligences of the students. Therefore, we should make assessments that would focus as many learning styles and multiple intelligences as possible. 5. To contribute to the building of the culture of success in the school, it is pedagogically sound that in our assessment......

Words: 480 - Pages: 2

Linux Sobell Chapter 5 Pg 182

...modified versions under the same terms/licensing. 4. What is the Free Software Foundation/GNU? Linux? Which parts of the Linux operating system did each provide? Who else has helped build and refine this operating system? GNU stands for "GNU'S Not Unix", and it was designed to be a UNIX-like operating system developed by Richard Stallman. Linux is the name of operating system kernel developed by Linus Torvalds. GNU's tools aside the Linux kernel make the operating system known as “Linux” aka “GNU/Linux”. Thousands of people helped refine the operating system online. 1. What does the process of installing an operating system such as fedora rhel involve? Installing Fedora/RHEL is the process of copying operating system files from a CD, DVD, or USB flash drive to hard disk(s) on a system and setting up configuration files so Linux runs properly on the hardware. Several types of installations are possible, including fresh installations, upgrades from older releases of Fedora/RHEL, and dual-boot installations. 1. What advantages does a live system have over an installed system? Live System- A computer that runs the Wide Area Progressive games and displays the main system window. Advantages- Customization, cost, free market, stability, and community. 4. Where on the Linux disk should you put your boot partition or the root partition if you do not use the boot partition? To boot Linux, you would need to place the kernel within the area addressable by the BIOS. This......

Words: 667 - Pages: 3

Linux

...Moises Pelaez | IT250 | Linux Operating System: Assignment 1.1 | 3/30/2013 | 1) In the free software world, there are several uses of the word "free." The two main ones are "free as in speech" and "free as in beer." Free as in speech means you are relatively unfettered in what you can do with the software. You can modify it, use it for whatever you want, and give it to others (or even sell it). Free as in beer means that you can obtain it for no monetary cost. Richard Stallman originally envisioned GNU to be free as in speech. At the time he started the project (in 1983), internet access was slow and expensive, high-capacity storage devices weren't readily available, and very few people had a personal computer. It would have been infeasible to offer GNU on a gratis basis. Stallman actually used to charge $150 for a tape with the GNU software on it, plus $15 for a manual. 2) The GNU project develops programs and utilities for an as yet rudimentary operating system known as "GNU." Since the programs are open-source, they have been adapted to work using the Linux kernel as well. Other than using its programs, there is no direct relationship. 3) Advantage #1 – Stability: If you have used other operating systems, once you have made the switch to Linux, you will notice that Linux has an edge over Windows here. I can remember rebooting Windows many times over the years, because an application crashed, and I could not continue working. Linux can crash also, but it......

Words: 1208 - Pages: 5

Linux

...Chapter 1 1. Free software is software that users have the freedom to distribute and change. The three main characteristics of free software are: The source code has to be distributed with the program, you cannot restrict people from redistributing/modifying/using the software, and users must be allowed to redistribute modified versions under the same terms/licensing. 4. The Free Software Foundation is the sponsor of the GNU Project. GNU developed many of the tools that are part of Linux. Linux is the name of the operating system kernel developed by Linus Torvalds, which has been expanded and improved by thousands of people on the Internet. Torvalds’ kernel and GNU’s tools work together as the Linux operating system. Chapter 2 1. Installing Fedora/RHEL is the process of copying operating system files from a CD, DVD, or USB flash drive to hard disks on a system and setting up configuration files so Linux runs properly on the hardware. Several types of installations are possible, including fresh installations, upgrades from older releases of Fedora/RHEL, and dual-boot installations. Chapter 3 1. A live system gives you a chance to preview Fedora without installing it. It does not write to hard disks. 4. The ubiquity utility is a graphical installer written mostly in Python. It installs Ubuntu from a live session. 8. Remove quiet and splash from the boot command line. Press F6 from the initial install screen to display the boot command line. Press backspace...

Words: 461 - Pages: 2

Linux Chapter 12 and 13

...0.1–100.31.255.254 100.32.0.1–100.47.255.254 100.48.0.1–100.63.255.254 100.64.0.1–100.79.255.254 2. The cat command is run on the remote system; to display the results of a text file to the local terminal on your machine, you just save this to a file on the local machine instead using redirection. The cat command cannot be used to save a binary file in this manner as it only works on text files. 3. You must first purchase a domain from a domain registrar such as godaddy.com or networksolutions.com. There are lots of them and you can simply Google "domain registrar" to find one. A couple domain names available would be, www.superdupernoobpwnerpooper.com www.whereismyface.com, and finally, www.isthisreallifeoramijusthigh.com Chapter 13 Review Questions 2. D 4. False 6. B 8. B, C 10. True 12. True 14. True 16. A 18. A 20. D Hands On Projects 13-1 1. OK 2. OK 3. OK 4. OK 5. OK 6. OK 7. OK 8. OK 9. OK 10. OK 13-2 1. OK 2. OK 3. OK 4. OK 5. OK 6. OK 7. 1 Hour is the default TTL is how long data will remain in other name servers cache. 8. The two records include, Zone Authority Information (SOA) and Name Server localhost (NS) 9. OK 10. OK 11. OK 12. OIK 13. YES 14. YES 15. OK 16. OK 17. OK 18. OK 19. OK 20. YES because we just added it. 21. YES because we just added it. 22. YES because we just added it. 23. YES with % Packet...

Words: 926 - Pages: 4

Fadora and Red Had Enterprise Linux: Chapter 1 Exercise Answers

...Chapter 1 Questions What is free software? List three characteristics of free software.Free software is code that is available for free to everyone, but it is also free in the sense that it can be used and altered freely to the user's desires. It is free to be studied, redistributed, and modified. Why is Linux popular? Why is it popular in academia?Due to the operating system's distribution among universities, students were able to become used to it's sophisticated developing environment which helped these graduates succeed in the industry as UNIX was being spread throughout the world. What are multiuser systems? Why are they successful?Multiuser is a term that defines an operating system or application software that allows access by multiple users of a computer. They are so successful because they allow for collaborative projects to be conducted with much more ease and efficiency. What is the Free Software Foundation/GNU? What is Linux? Which parts of the Linux operating system did each provide? Who else has helped build and refine this operating system?The GNU is a completely free (in the freedom sense) operating system built by Richard Stallman and many of its components, except for the kernel, were completed in the early '90s. Linus Torvalds wrote the kernel for Linux, which was also intended to be a free operating system, in the early '90s. The two systems then were combined together to finish Linux, with it's original kernel and added features......

Words: 663 - Pages: 3

Linux

...Unit 2 Discussion 1: Identifying Layers of Access Control in Linux One of the most vital security tasks is to maintain control over incoming network connections. As system administrator, there are many layers of control over these connections. At the lowest level unplug network cables, but this is rarely necessary unless your computer has been badly cracked beyond all trust. More realistically, you have the following levels of control in software, from general to service-specific: Network interface - The interface can be brought entirely down and up. Firewall - By setting firewall rules in the Linux kernel, you control the handling of incoming (and outgoing and forwarded) packets. This topic is covered in Chapter 2. A superdaemon or Internet services daemon- A superdaemon controls the invocation of specific network services. Suppose the system receives an incoming request for a Telnet connection. The superdaemon could accept or reject it based on the source address, the time of day, the count of other Telnet connections open... or it could simply forbid all Telnet access. Superdaemons typically have a set of configuration files for controlling your many services conveniently in one place. Individual network services - Any network service, such as sshd or ftpd, may have built-in access control facilities of its own. For example, sshd has its AllowUsers configuration keyword, ftpd has /etc/ftpaccess, and various services require user authentication. ...

Words: 324 - Pages: 2

Linux

...www.it-ebooks.info Praise for Previous Editions of A Practical Guide to Fedora and Red Hat Enterprise Linux ® ® “Since I’m in an educational environment, I found the content of Sobell’s book to be right on target and very helpful for anyone managing Linux in the enterprise. His style of writing is very clear. He builds up to the chapter exercises, which I find to be relevant to real-world scenarios a user or admin would encounter. An IT/IS student would find this book a valuable complement to their education. The vast amount of information is extremely well balanced and Sobell manages to present the content without complicated asides and meandering prose. This is a ‘must have’ for anyone managing Linux systems in a networked environment or anyone running a Linux server. I would also highly recommend it to an experienced computer user who is moving to the Linux platform.” —Mary Norbury IT Director Barbara Davis Center University of Colorado at Denver from a review posted on slashdot.org “I had the chance to use your UNIX books when I when was in college years ago at Cal Poly, San Luis Obispo, CA. I have to say that your books are among the best! They’re quality books that teach the theoretical aspects and applications of the operating system.” —Benton Chan IS Engineer “The book has more than lived up to my expectations from the many reviews I read, even though it targets FC2. I have found something very rare with your book: It doesn’t read like the standard......

Words: 315186 - Pages: 1261

Linux Chapter 1

...Chapter 1 Introduction to Linux At a Glance Class Notes Table of Contents • Overview • Objectives • Teaching Tips • Quick Quizzes • Class Discussion Topics • Additional Projects • Additional Resources • Key Terms • Technical Notes for Hands-On Projects Lecture Notes Overview Linux technical expertise is essential in today’s computer workplace as more and more companies switch to Linux to meet their computing needs. Thus, it is important to understand how Linux can be used, what benefits Linux offers to a company, and how Linux has developed and continues to develop. In the first half of this chapter, you will learn about operating system terminology and features of the Linux operating system, as well as the history and development of Linux. Later in this chapter, you will learn about the various types of Linux and situations in which Linux is used. Chapter Objectives In this chapter, you will learn to: • Understand the purpose of an operating system • Outline the key features of the Linux operating system • Describe the origins of the Linux operating system • Identify the characteristics of various Linux distributions and where to find them • Explain the common uses of Linux in industry today Quick Quiz 1 1. What term is used to describe a running program on Linux? a. Application b. Process c. Runtime d. Project 2. What is......

Words: 3777 - Pages: 16

Linux Chapter 5

...James F Sloan III 4/2/15 IT250 Chapter 5 1. The “who” command helps you determine who is logged in on a specific terminal. 2. Give the command “mesg n” to keep other ordinary users from writing to your terminal. You can take this action when you do not want to be disturbed or are viewing something on your screen that you do not want overwritten. 3. $ cp   to_do done – it will overwrite the   done file with the new file names to_do. $ mv   to_do done-   it will do the same as cp, the to_do file will overwrite the done file.  4. Give the command apropos editor. Most systems have vim, ex, ed, and more. 5. $ grep "Ace Electronics" phone $ sort phone $ uniq phone 6. When you compare binary files with diff, diff displays a message saying the files differ when the files differ or no message when the files are the same. The diff utility compares ASCII files on a line-by-line basis; it is not designed to compare binary files on a byte-by-byte basis. Use cmp to compare binary files in that manner. 7. The answer is system dependent. 8. The utility displays a message saying that the command you are looking for is not in the list of directories that are in your search path. For example, $ which me /usr/bin/which: no me in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6bin:. 9. No. However, some commands that are built into a shell have an executable counterpart that exists as a file (for example, echo). 10. Approximately twenty, not......

Words: 283 - Pages: 2

Linux

...Chapter 18 Exercises 1.What is the difference between the scp and sftp utilities? copies file to and from a remote system SFTP is the same but is secure 2.How can you use ssh to find out who is logged in on a remote system? Assuming you have the same username on both systems, the following command might prompt you for your password on the remote system; it displays the output of who run on host: $ ssh host who 3.How would you use scp to copy your ~/.bashrc file from the system named plum to the local system? $ scp ~/.bashrc zack@plum: 4.How would you use ssh to run xterm on plum and show the display on the local system? Assuming you have the same username on both systems and an X11 server running locally, the following command runs xterm on plum and presents the display on the local system: $ ssh plum xterm You need to use the –Y option if trusted X11 forwarding is not enabled. 5.What problem can enabling compression present when you are using ssh to run remote X applications on a local display? When using compression latency is increased and the outcome is always undesirable slower speeds, and data interruption. 6.When you try to connect to a remote system using an OpenSSH client and you see a message warning you that the remote host identification has changed, what has happened?What should you do? This message indicates that the fingerprint of the remote system is not the same as the local system remembers it. Check with the remote......

Words: 1325 - Pages: 6

Linux

...University of Sunderland School of Computing and Technology File Management System in Linux CUI Interface A Project Dissertation submitted in partial fulfillment of the Regulations governing the award of the degree of BA in Computer Studies, University of Sunderland 2006 I. Abstract This dissertation details a project to design and produce a prototype Linux character environment file manipulation assisting application. The application is offering a friendly menu driven interface to handle the jobs that non-programmers keep finding cumbersome to master when it comes to working in a Unix/Linux interface, resulting in serious mistakes and much loss of productive time. The Linux File Management System is a basic program for every user at a Unix/Linux terminal. Advantages here include the fact that the support team does not have to be burdened with solving simple file based queries by the employees. The areas of Designing GUI interfaces in Linux and Windows versus Linux Security were researched and a prototype has been designed, developed and tested. An evaluation of the overall success of the project has been conducted and recommendations for future work are also given. Words II. Table of Contents 1) Introduction.................................................................................................................................4 1.1 Overview.................................

Words: 17681 - Pages: 71

Linux

...Review Questions Chapter 6: Host Hardening 1. To know how to install an operating system with secure configuration options, you would use a... a. security baseline b. standard c. security template d. wizard 2. A systems administrator’s main role is to… a. manage a network b. implement security baseline on servers c. None of the above 3. In a Windows network, which of the following could be used to implement security measures on multiple computers through a domain? a. Policy Maker b. GPO c. Domain ACL 4. LINUX distributions are standardized which makes them easier to manage a. True b. False 5. Which of the following is true? a. A particular version of UNIX will offer multiple user interfaces. b. All UNIX user interfaces are command line interfaces c. Both of the above. d. Neither a. nor b. 6. UNIX command-line interfaces are called _____. a. versions b. distributions c. GUIs d. shells e. windows 7. Routers are sometimes hosts. a. True. b. False 8. Cisco’s operating system for its routers and most of its managed switches is... a. IOS b. UNIX c. LINUX d. Windows 9. To apply patches in Windows 2000 and later versions of Windows, you choose an option on the _______ menu. a...

Words: 445 - Pages: 2

Chapters 10 Linux

...Jose Alberto Salazar OECS-205-D02 Homework 2 Answer Exercises 1 and 3 on page 499 (End of chapter 10) 1.- How does single-user mode differ from multiuser mode? When a system is in single-user mode, you can log in only at the console. Not all of the file systems are mounted,and many daemons are not running. With the system in multiuser mode you can login at any terminal or workstation that is set up for login, most or all of the filesystems are mounted, and all of the daemons that your system is set up to run arerunning. 3.-What do the letters of the su command stand for? (Hint: It is not Superuser.) What canyou do with su besides give yourself root privileges? How would you log in as Zach ifyou did not know his password but knew the root password? How would you establishthe same environment that Zach has when he first logs in? The letters su stand forsubstitute user. With su you can use the su utility can spawn a shell or execute aprogram with th identity and privileges of a specified user, including root.Byfollowing the su on the command line with Zach’s name as long as you are working with root privileges will allow you to log on as Zach.By using the su commandutility and the root password will alow you to log on as Zach with the sameenvironment Answer Exercises 1,3,5,6,7 on page 530 (End of chapter 11) 1.- What is the function of the /etc/hosts file? Which services can you use in place of or to supplement the hosts file? ...

Words: 536 - Pages: 3