Linux Homework Please show console output
1: Please create a script that prints “Hello, your name.”
2: Please create a directory call it yourname_bin, and add it to PATH. Then move the script “Hello, your name” to yourname_bin. Then run it from your root directory.
3: Add a new command called ‘a’ which will perform exact same as ‘ls -a’.
4: Create a function call it yournamesortFile, which will sort all filenames of current directory.
5: Please make your own page using shell script, print following as your page.
<html>
<head>
<title>
YourName System Information
</title>
</head>
<body>
<h1>YourNameSystem Information</h1>
</body>
</html>
6: Add one variable in the example, name the variable as greeting, which displays “Hello, my name is your name” in the body using variable greeting.
7: Add one variable in the example, name the variable as FILE_LIST, which displays the filenames of current working directory.
You must include the program and execution from you command line in the linux system.
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images
- In UNIX Say there is a file, students, under your home directory. Here is the content of the file students: 1001, Joe Smith, 111 Main Street 1002, Mary Johnson, 287 Broadway Ave 1003, Taylor Farlan, 255 Becker Street Use cut command to show only the third column of the file (only write down the command)arrow_forwardUnix-based operating systems usually include a tool named tail. It displays the last 10 lines of a file whose name is provided as a command line argument. Write a Java program that provides the same behavior i.e. the user can specify how many lines to print from the terminal. Display an appropriate error message if the file requested by the user does not exist, or if the command line argument is omitted. Note: Make sure to display the last n lines of a file whose name is provided as a command line argument. You might need to pass a file as an argument, therefore make sure to have access to a sample file, the contents of which you want to print out.arrow_forwardThe ObjectOutputStream class is used to serialize an Object. The following Serialize Demo program instantiates an Employee object and serializes it to a file. Complete the code. Write codes where asked with appropriate try catch block class SDemo { } main method { } //Create an Employee object //set a name for this employee //set employee number to 1010 //create an object of file output stream //create an object of the object output stream //write Employee info to this object of output stream //close the out stream //close the file //print statementarrow_forward
- 4. Fast in java coding please. Thank you File Encryption is the science of writing contents of a file in a secret code. Yourencryption program should work like a filter, reading the content of one file,modifying the data into a code, and then writing the coded contents out to a secondfile. The second file will be a version of the first file, but written in secretcode. Write a program to demonstrate the above working with binary files.arrow_forwardYou will develop a client side and a Servlet program that will work with a database. 1. The client (front end) should have a title "NJIT Credit Union", centered. 2. The client should have a background color. 3. The client should have a text field with label 'UserID' where user will enter userID (integer) and a Submit button with text "Submit". 4. An unsuccessful authentication should have a message printed on the screen, in red, stating that "Your authentication has failed, please try again.” (no pop up message). At this point the text field should get cleared and ready to accept a new input. Your program should not exit. 5. A successful authentication should be followed by a message on the screen, in green, stating that "Your authentication is successful" (no pop up message). 6. There should be two other text boxes with label "Deposit" and "Withdraw" where user will enter an amount (you should accommodate for decimals). These two text boxes should only be enabled after successful…arrow_forwardAssuming the file "File.txt" exists, where must it be located for this code snippet to work without error? ifstream in_file; in_file.open ("File.txt"); In system RAM On the hard drive or flash drive In the same folder (directory) as the source code (.cpp) All of thesearrow_forward
- 1. In an earlier assignment, you created a fileAsst directory containing several files. Give a command that will create a file named listing.dat, in your current (commandsAsst) directory, containing a list of the names of all the files in your fileAsst directory. The listing must not include dates, file sizes, or any information other than the names. 2. Someone has decided that the function sequentialInsert, declared in -cs252/Assignments/commandsAsst/project/arrayops.h, should be renamed orderedInsertion. Give a command to produce the altered version the header file, saving it as ~/UnixCourse/commandsAsst/arrayops.h (Something to think about: Why would the same approach not work well for changing the variable name i to i0?) 3. Sometimes programmers propose changes to an existing software definition and need to know what other code could be affected by the change. Suppose that you are a programmer who has proposed a change to the C/C++ data type known as "timespec". You know that there…arrow_forwardWrite a python script that opens a text file names.txt in "reading" mode, uses a for loop to scan the file, read each line and print it. screenshot of text file includedarrow_forwardSuppose you want to back up a huge file (e.g., a 10-GB AVI file) to aCD-R. You can achieve it by splitting the file into smaller pieces and backing upthese pieces separately. Write a utility program that splits a large file into smallerones using the following command:java Exercise17_10 SourceFile numberOfPiecesThe command creates the files SourceFile.1, SourceFile.2, . . . , SourceFile.n,where n is numberOfPieces and the output files are about the same size.arrow_forward
- For example, if you create a file named: "users.txt" that contains these user names: daniel moshe yossy gabi ran bijo baruch bibi The following command run in an elevated command prompt will parse this file, and create a new user on your computer FOR /F %i in (users.txt) DO NET USER %i P@ssw0rd /ADD With two (2) other options that you specify for each user when they are added?arrow_forwardPart 2 OCTAL numbers have special usage regarding file permission. can you modify the permission by using OCTAL number? Assuming current working directory is "/home/test1/Exam1" and "rwxrw _r_ _" is the file permission setting of "Hello.java" . Remove the execution permission from the owner and add write permission to the other users in the other grouparrow_forwardUnix Commands Using the Unix commands, you have learned in class, create the following file structure: • Create a directory called "unix_hw" in your home directory. • Within "unix_hw", create a file called "helloworld.c" and a directory called "output". • Compile your helloworld.c file into output folder. This should create an output executable file in output folder. • Run the helloworld program from output folder. • Within "output", create a file called "notes.txt". • Move "notes.txt" to "unix_hw" (using relative path) • Remove "notes.txt" from output folder. (using absolute path) • Remove "output" (using absolute path) Perform above steps on your Unix account, then copy each command your ran into a text file and take a screenshot of your terminal window such that all steps are visible.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education