Os File.docx

  • Uploaded by: sonali
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Os File.docx as PDF for free.

More details

  • Words: 545
  • Pages: 7
EXPERIMENT-1 1.BASIC UNIX COMMANDS

1. COMMAND NAME: cal- It is used to display the current calendar of the month. SYNTAX: ~$ cal EXAMPLE: ~$ cal OUTPUT:

2. COMMAND NAME: cal [mm][yyyy]- It is used to display any calendar according to the month and year. SYNTAX: ~$ cal [MM] [YYYY] EXAMPLE: cal 03 2015 OUTPUT:

3. COMMAND NAME: whoami - It is used to display the username. SYNTAX: ~$ whoami EXAMPLE: ~$ whoami OUTPUT:

4. COMMAND NAME: users - It is used to display the name of all the users. SYNTAX: ~$ users EXAMPLE: ~$ users OUTPUT:

5. COMMAND NAME: who - It is used to display the login details of all the users. SYNTAX: ~$ who EXAMPLE: ~$ who

OUTPUT:

6. COMMAND NAME: man [Command] - It is used to display details of any command. SYNTAX: ~$ man [Command Name] EXAMPLE: ~$ man whoami

OUTPUT:

7. COMMAND NAME: date - It is used to display the current date, month, year with time. SYNTAX: ~$ date EXAMPLE: ~$ date OUTPUT:

8. COMMAND NAME: echo – It is used to display any message. SYNTAX: ~$ echo [Data] EXAMPLE: ~$ echo sonali is great OUTPUT:

9. COMMAND NAME: date ‘[+format]’ – It is used to display time and date in a particular format. SYNTAX: ~$ date ‘[+format]’ EXAMPLE: ~$ date ‘+TIME:%H:%M:%S’ OUTPUT:

10. COMMAND NAME: clear – It is used to clear the message. SYNTAX: ~$ clear EXAMPLE: ~$ clear OUTPUT:

11. COMMAND NAME: passwd - It is used to change the password of a user account. SYNTAX: ~$passwd EXAMPLE: ~$passwd OUTPUT:

12. COMMAND NAME: login – It is used to establish a new session with the system. SYNTAX: ~$ login EXAMPLE: ~$ login OUTPUT:

EXPERIMENT-2 FILE MANAGEMENT 1. COMMAND NAME: mkdir - It is the short form of make directory.It is used to create new directory only if they do not exists with that name. SYNTAX: ~$ mkdir [directory name] EXAMPLE: ~$ mkdir unix123 2. COMMAND NAME: cd - It is used to change the present directory to any other directory. SYNTAX: ~$ cd EXAMPLE: ~$ cd 3. COMMAND NAME: touch - It is used to create empty files. SYNTAX: ~$ touch [filename] EXAMPLE: ~$ touch unix1 4. COMMAND NAME: cat - It is used to concatenate files and print to stdout. SYNTAX: (a) ~$ cat [filename] (b) ~$ cat > filename (c) ~$ cat [filename] > [filename] (d) ~$ cat [filename] >> [filename] EXAMPLE: ~$ cat unix1 ~$ cat > unix1 -This is used to write into the file. ~$ cat unix1 > unix2 - Contents of unix2 will be overwritten by unix1. ~$ cat unix1 >> unix2 - Contents of unix1 will be appended at the end of unix2. 5. COMMAND NAME: cp - It is used to copy one or more files to another location. It copies one SOURCE to DESTINATION. SYNTAX: ~$ cp [source][destination] EXAMPLE: ~$ cp fileA fileB

6. COMMAND NAME: mv - It is used to move or rename the files and directories which are there on system.If the destination file name does not exists then it will change the source file name to destination file name. SYNTAX: ~$ mv [source][destination]

7. COMMAND NAME: rm - It is used to remove a directory. SYNTAX: ~$ rm [directory] EXAMPLE: ~$ rm direc123

Related Documents

Os
November 2019 66
Os
November 2019 58
Os
May 2020 36
Os
November 2019 68
Os
November 2019 60
Os
November 2019 35

More Documents from ""