1) cat > dog When you enter this command it will create a file with name dog in current working directory. Also it allow us to write to the file. 2) A)who | grep $USER =================== who => displays who is logged in grep => is pattern searcher The computer outputs who you are, when you logged on and where you logged on from. B)grep \$HOME file1 =================== If there is no "file1" on your computer it tells you that grep: file1: no such file or directory. C) echo u*>>file1 ================= This will create a file named file1 in current directory and write uan to it. If file exists then it will append uan to it. D) echo 'u*'>>file1 ================== This will create a file named file1 in current directory and write u* to it. If file exists then it will append u* to it. E) ps ===== it will display current running process status in our system F) . fileA ========== Computer will try to execute the .fileA G) set noclobber =============== If you are in the csh or tcsh shells it tells the computer to not allow files to be overwritten, but if you are in ksh or bash shells it does nothing. The correct command for ksh or bash shells would be set -o noclobber. H) Set -o -========= This tells you which functions are on or off. I)chmod +x file2 ================ It will make file2 as executable. 3.) How can we change the prompt to be Next? in both families of shells(C shells and Korn shells)? In C shells(csh and tcsh) type in set prompt='Next?'. In Korn shells(sh, bash, and ksh) type PS1='Next?'. 4) What data is passed in each filed in passwd file? Username:password:UserID:Group ID (GID):User ID Info:Home directory:Command/shell 5)What command instructs the shell not to accept CTRL-D as a signal to log off? In the csh or tcsh shells use set ignoreeof, and in the ksh or bash shells use set-o ignoree of.
Part 3. Self Test 3 from the textbook 1) When you enter following command, what happens...
WITH SCREENSHOTS PLEASE Linux+ Guide to Linux Certification Project 9-3 In this hands-on project, you run processes in the background, kill them using the kill and killall commands, and change their priorities using the nice and renice commands. 1. On your Fedora Linux virtual machine, switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. 2. At the command prompt, type sleep 6000 and...
Project 3-7 In this hands-on project, you use the grep and egrep commands alongside regular ex pression metacharacters to ex plore the contents of tex t files. 1. Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!. 2. At the command prompt, type grep “Inn” sample1 and press Enter. What is displayed and why? 3. At the command prompt, type grep -v “Inn”...
Login to Suse Linux as root. Complete the task working as the root user. 1. What is your current directory. What did you enter at the command prompt to determine your current working directory? 2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use...
What are the exact commands I should use to complete the task? 1. Run command (date; sleep 45; echo “Done.”; date) > date.out in the foreground (i.e. without &) 2. Suspend it with Ctrl-Z. Pay attention to the number in the [], it will become handy later. This number is the job number of the command that has been suspended. 3. Run command top to display only processes started by you (i.e. associated with your userid). Write down the process...
Question 2 0/1 point (graded) What happens when you remove a directory using the command rm -r? You cannot remove a directory using the rm command. You permanently remove the entire directory, including all files and subdirectories. You move the entire directory to a trash folder, but it can be restored later. You get a warning message asking if you want to proceed, then you delete the directory. incorrect Answer Incorrect: Try again. Unix does not warn you before permanently...
1.) How do you find what files are in a directory 2. How do you hide a file 3. How do you find how much space is left on a disk 4. How do you find out how much space you are using 5. How do you find out how big a file is? 6. What does drwxr-xr-x mean? 7. What’s a group in unix? 8. What are the three sets of permisions in unix? 9. what does chmod 700...
One can incidentally terminate sushi by pressing Ctrl+C (Ctrl+Break, Command+dot) or a similar combination of keys that sends SIGNIT to the shell. Function prevent_interruption() sets up a signal handler that intercepts SIGINT and displays message “Type exit to exit the shell” on stderr. The name of the handler is refuse_to_die(), its skeleton and the skeleton of prevent_interruption() are provided in sushi.c. Hint: use system call sigaction() to set up the handler. As a result, when you attempt to interrupt the...
I have the following code....from the previous lab....the above
needs to be added to what is already existing. ALSO MODIFY
SEMAPHORES TO USE pthreads instead of the pipe constructs P() &
V()
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <sys/stat.h>
void printStat(char *filename);
//Main
int main(int argc, char *argv[])
{
//Process Id (storing)
pid_t pid;
int j;
//printf("Welcome to Project Three\n”);
// For loop*/
for (j = 1; j...
Need three seperate files. ShoppingCartManager.java
ShoppingCart.java
ItemsToPurchase.java
These are from part 1
what do you mean by deep study
7.25 LAB*: Program: Online shopping cart (Part 2) Note: Creating multiple Scanner objects for the same input stream yields unexpected behavior. Thus, good practice is to use a single Scanner object for reading input from System.in. That Scanner object can be passed as an argument to any methods that read input This program extends the earlier Online shopping cart program (Consider...