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
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 Linux “du” (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
Get Answers For Free
Most questions answered within 1 hours.