Question

9. command used to print contents of a directory, by default it lists contents of current...

9. command used to print contents of a directory, by default it lists contents of current working directory?

10. command q ? Explain

11. Command for copy? What commands will copy hello.txt to dir2 directory?

12. du command - meaning and example

20.  free command

Homework Answers

Answer #1

Command used to print contents of a directory, by default it lists contents of current working directory?

To print the name of the current working directory, use the command pwd . As this is the first command that you have executed in Bash in this session, the result of the pwd is the full path to your home directory. The home directory is the default directory that you will be in each time you start a new Bash session.

command q ? Explain

The command to quit out of vi is :q. Once in the command mode, type colon, and 'q', followed by return. If your file has been modified in any way, the editor will warn you of this, and not let you quit. To ignore this message, the command to quit out of vi without saving is :q!.

Command for copy? What commands will copy hello.txt to dir2 directory?

$ cp hello.txt dir2

To copy files and directories use the cp command under a Linux, UNIX-like, and BSD like operating systems. cp is the command entered in a Unix and Linux shell to copy a file from one place to another, possibly on a different filesystem. The original file remains unchanged, and the new file may have the same or a different name.

du command - meaning and example

The Linuxdu” (Disk Usage) is a standard Unix/Linux command, used to check the information of disk usage of files and directories on a machine. To find out the disk usage summary of a /home/tecmint directory tree and each of its sub directories. Enter the command as:

du  /home/tecmint

free command

Syntax: free [-b|-k|-m] [-o] [-s delay] [-t] [-l] [-V]

In linux, there exists a command line utility for this and that is free command which displays the total amount of free space available along with the amount of memory used and swap memory in the system, and also the buffers used by the kernel. This is pretty much what free command does for you

Know the answer?
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
Similar Questions
PART 4: Learn about commands to navigate the directory tree structure: use the ls –ali /  ...
PART 4: Learn about commands to navigate the directory tree structure: use the ls –ali /   command to review the contents of the / directory Review the Linux Filesystem Standard (FSSTD) and document the following directories’ contents / ------- |--bin |--boot               |--dev               |--etc |--home               |--lib               |--mnt               |--opt               |--root               |--sbin               |--tmp               |--usr               |--var 3. use the cd etc  OR cd /etc  to change your default directory to the etc directory 4. use the...
Write UNIX commands to perform the following tasks. Each task must use exactly one line of...
Write UNIX commands to perform the following tasks. Each task must use exactly one line of command. Unless stated otherwise, all files are assumed to be at your current working directory. a) (10 points) Print your current working directory into a file named file1 b) (10 points) Assume that your current working directory is NOT the same as your home directory. Print all file and subdirectory names of your home directory into a file named file2. c) (15 points) Copy...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and the output in a word document and submit it. Part1: 1. Log in to Linux using your user account name and password. 2. If you logged in using a graphical login screen, open a terminal window by clicking on the icon in the lower left corner of the desktop to open the main menu, then selecting System Tools, then Terminal. A terminal window opens....
please use linux/unix command terminal to complete, step 1 1-create a new directory named by inlab4...
please use linux/unix command terminal to complete, step 1 1-create a new directory named by inlab4 enter directory inlab4 create a new file named by reverse.c with the following contents and then close the file: /*reverse.c */ #include <stdio.h> reverse(char *before, char *after); main() { char str[100]; /*Buffer to hold reversed string */ reverse("cat", str); /*Reverse the string "cat" */ printf("reverse(\"cat\")=%s\n", str); /*Display result */ reverse("noon", str); /*Reverse the string "noon" */ printf("reverse(\"noon\")=%s\n", str); /*Display result */ } reverse(char *before,...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of the separation is that they are not displayed by the default version of the ls command)                         a. the prefix "rc" (rc.filename)               c. the extension .cfig                         b. a dot (.) at the beginning                    d. by having the SUID bit set 2. The IP address which is reserved for local loopback (equivalent to "localhost") is:                         a. 255.255.255.0                                   c. 192.168.70.1...
Project 10-3 In this hands-on project, you view the configuration of the System Log Daemon and...
Project 10-3 In this hands-on project, you view the configuration of the System Log Daemon and the logrotate utility on Ubuntu Server Linux. 1. Boot your Ubuntu Server Linux virtual machine. After your Linux system has been loaded, log into tty1 using the user name of root and the password of LNXrocks!. 2. At the command prompt, type ls –l /dev/log and press Enter. What is the file type? Which daemon on Ubuntu Server Linux uses this file and what...
A stack can be used to print numbers in other bases (multi-base output). Examples: (Base8) 2810...
A stack can be used to print numbers in other bases (multi-base output). Examples: (Base8) 2810 = 3 * 81 + 4 * 80 = 348 (Base4) 7210 = 1 * 43 + 0 * 42 + 2 * 41 + 0 * 4 = 10204 (Base 2) 5310 = 1 * 25 + 1*24 + 0 * 23 + 1 * 22 + 0 * 21 + 1 * 20 = 1101012 Write a java program using stacks that...
C LANGUAGE CODE WITH COMMAND-LINE ARGUMENTS (NO SCANF TO BE USED ) Q]. Write a program...
C LANGUAGE CODE WITH COMMAND-LINE ARGUMENTS (NO SCANF TO BE USED ) Q]. Write a program that displays all the prime numbers in the given array with the following constraint. Constraint: Only those prime numbers should be displayed whose location is a composite number. Although you may have several prime numbers in the array, only those prime numbers should be displayed which are stored at non-prime locations. Remember that the first position in an array corresponds to the location/index 0....
#Linked Lists and Classes #C++ Hi, please use singly linked list method to do this question....
#Linked Lists and Classes #C++ Hi, please use singly linked list method to do this question. Thank you! Here’s the contents of a file called example.cpp: // example.cpp #include "LinkedList.h" #include <iostream> #include <string> using namespace std; int main() { cout << "Please enter some words (ctrl-d to stop):\n"; LinkedList lst; int count = 0; string s; while (cin >> s) { count++; lst.add(remove_non_letters(s)); } // while cout << "\n" << count << " total words read in\n"; cout <<...
Use Python to Complete the following on a single text file and submit your code and...
Use Python to Complete the following on a single text file and submit your code and your output as separate documents. For each problem create the necessary list objects and write code to perform the following examples: Sum all the items in a list. Multiply all the items in a list. Get the largest number from a list. Get the smallest number from a list. Remove duplicates from a list. Check a list is empty or not. Clone or copy...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT