Question

Execute the following UNIX commands and paste the results in a text editor like Microsoft Word...

Execute the following UNIX commands and paste the results in a text editor like Microsoft Word

  1. Create a directory using “mkdir” and name the directory “test”

  2. Change directory to test

  3. In the test directory, create a file using nano and name the file “NewDoc.c”

  4. Use “cd ..”

  5. Execute “ls”

  6. Create a file “temp.c” using nano

  7. Delete “temp.c” using the “rm” command.

Execute each command in the question, copy and paste the result from the terminal window into Microsoft word or any text editor.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

ankesh@zzz:~$ mkdir test
ankesh@zzz:~$ cd test
ankesh@zzz:~/test$ nano NewDoc.c
ankesh@zzz:~/test$ cd ..
ankesh@zzz:~$ ls
alsa-info.sh examples.desktop Public test
Desktop kde-config-touchpad_0.8.1-2_all.deb Resume.DOCX
Documents Music snap Videos
Downloads Pictures Templates xyz
ankesh@zzz:~$ nano temp.c
ankesh@zzz:~$ rm temp.c

Explanation:

mkdir- It is used to create a directory.

cd- to change directory. Here changing the directory to test.

nano- It is a text editor for unix like operating system. You can open file using this command. If the file doesn't exist, then it will

create a file with the provided name and then open it. After it open the file, you can write in the file and to save it press

ctrl+o -> Enter -> ctrl+x.

cd ..- It is used to change the directory to the previous one.

ls- It is used to list the contents of the current working directory. In the above case, all the file and directories are present in my system.

rm- It is used to remove/delete a file or directory. In the aboove case temp.c will be deleted

Add a comment
Know the answer?
Add Answer to:
Execute the following UNIX commands and paste the results in a text editor like Microsoft Word...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create working Unix syntax commands for the following and answer the questions below. Answer the following...

    Create working Unix syntax commands for the following and answer the questions below. Answer the following simple questions. List at least four commonly used shells. How would you start editing the file first-file using the pico (or nano) editor? Write down the pico/nano command that will: Move to the beginning of the line. Move to the end of the line. Move back one page. Cut selected text. Exit pico. Name two other common Unix text editors besides pico/nano.

  • JAVA DATA STRUCTURES Write a line-based text editor. The command syntax is similar to the Unix...

    JAVA DATA STRUCTURES Write a line-based text editor. The command syntax is similar to the Unix line editor ed. The internal copy of the file is maintained as a linked list of lines. To be able to go up and down in the file, you have to maintain a doubly linked list. Most commands are represented by a one-character string. Some are two characters and require an argument (or two). Support the commands shown below: Command Function Go to the...

  • There are multiple options for text editors in Linux: vi, Nano, vim, etc. My favorite is...

    There are multiple options for text editors in Linux: vi, Nano, vim, etc. My favorite is vi. Demonstrate that you are able to use a text editor. File copy, move, and removal. Try not to rely on “cd” commands. Go to your Labs directory. Use one command to finish each step, provide screenshots of commands and results.

  • Vim and Unix Questions In a vim window, how do you set a tab to be...

    Vim and Unix Questions In a vim window, how do you set a tab to be two spaces wide? In a vim window, how do you, with a simple and single command, move the cursor to 5 lines below (don’t worry about the actual number of lines) and do nothing else? In a vim window, how do you, with a simple and single command, assuming your cursor is at the beginning of the word, delete the current word and do...

  • How do I do the following on a Unix Command Line Prompt: Change you command-line prompt...

    How do I do the following on a Unix Command Line Prompt: Change you command-line prompt to some interesting phrase/word of your choice Change the command-line prompt to display your user name and your current working directory (this includes your interesting phrase/word) Create a short alias for “ls -l -a”, it is up to you, but maybe “lsa” Execute the “who” command together with the “grep” command to identify whether your peer group (or any 3 or more people) are...

  • Could you help me do the commands from nmber 16 to 21 For this assignment, you...

    Could you help me do the commands from nmber 16 to 21 For this assignment, you will: Unpack a tar archive. Change the unpacked files. Repack the files into a new tar archive. Turn in your new tar archive. Details Do not use an editor unless it specifically states to edit the file. By "editor" I mean vim, gedit, pico, etc. Despite its name, we don't consider sed to be an editor in this assignment, so you may use it...

  • Task 1: Using the adduser Command Execute the following commands in the root command-line environment: #...

    Task 1: Using the adduser Command Execute the following commands in the root command-line environment: # ls /home # adduser newuser1 # ls /home Contrast the contents of home before and after the adduser command. ? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # cd /home/newuser1 # ls -al # tail -n 5 /etc/passwd What is the absolute path of newuser1's home directory? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- What is the default shell for newuser1? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # tail -n 5 /etc/shadow Contrast the newuser1 record with your...

  • Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell...

    Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell variables, and .profile script file, echo SHELL, HOME, PATH, MAIL and TERM are predefined shell variables. You can use the value of a shell variable in a shell command putting $ in front of it. For example, to display the value of the HOME directory of the user, specify $HOME in the echo command like echo $HOME. Do not give just the value of...

  • QUESTION 1 From YOUR home directory, execute a find command string that will locate the file...

    QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory Select the correct find command string below that will accomplish this. find /etc-name 'resolv.conf -cat D find /etc-name 'resolv.conf -exec cat 0 find. -name 'resolv.conf -exec cat 0\ find /-name 'resolv.conf' -exec cat 0 QUESTION 2 What find command...

  • IT 255 Milestone Two Guidelines and Rubric Overview: In this milestone, you will demonstrate your ability...

    IT 255 Milestone Two Guidelines and Rubric Overview: In this milestone, you will demonstrate your ability to create a basic script in Linux. Review the Final Project Guidelines and Rubric document to see how this milestone will prepare you for the scripting portion of the project. You will perform this milestone in Codio in the unit called "Milestone 2: Scripting." You will create this script with the vi editor. The script will combine multiple commands and simplify a repeatable task....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT