0% found this document useful (0 votes)
38 views

Linux

Uploaded by

iamdc1848
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
38 views

Linux

Uploaded by

iamdc1848
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 304
4 Q SPARK TECH CONSULTANCY SERVICES &buuus Cdoddd ~ em, ie Jivvesveticeddals INDEX ‘St No Command Name Priority Page No_ | Introduction ae 1 Chmod [ra B 2 ‘Umask P2 ema 3 Chown PL 7 | 4 herp PL 19 5 Date P2 ~ 20 6 Cal P2 2 7 Uname PL sin 8 Hostname P2 28 9 Sudo , su [rn 31 10 id P2 34] uw 1s PL 36 2 ed = PL 40 2B pwd PL 43 14 mkdir PL aad 15 rmdir [en 46 16 rm PL 48 7 which P2 50 18 whereis P2 51 19 whoami PL 52 20 who P2 53 2 users Pz 55 22 Cattac PL 56 B touch PL 61 2 nia P2 69 5 stat P2 7 26 PL 2 27 mv PL 76 28 ssh PL 3 29 scp. PL 82 30 ‘crontab PL 86 31 of PL 95 32 du PL 98 33 iff PL 102 34 syne PL 107 35 grep PL a4 36 grap PL 122 37 ferep PL 125 38 head PL 129 39 tail, PL 132 40 Morejess PL 134 a Vi editor PL 135 + SPARK TECH CONSULTANCY SERVICES e e c [sro Command Name Priority Page No _| cn 2 we PL 140 a3 be - Pz 145 cr aa test P3 154 ce 45, ‘dear PL 158 ie 26 cut Bt 159 - a7 free PL 164 1 48 vmstat PL 166 a “3 ft PL 169 © 50 kil PL 175 | SL Bate PL | | Gy 52, In ca 182 | c: 53 ‘mail : ‘emer 391 54 passwd PL c ' 35 ps PL | 36 Fuser °2 ¢ 37 Top PL ec 38 Shutdown reboot P2 | 59 Aik PL Cc © Echo P2 Gy Print? PZ © a Tee PL e GI ifeonfig P3 6a Netstat °2 i . 6 Nslookup P2 c 66 Ping PL ] Gl Hostname P2 C 8 Sed PL c | ‘Transiate,tr PS - 70 Sort PL e a Spit P3 72 Salplus: PL e B ‘Uname PL 74 Uptime P2 S 75 zp PL e 76 Gzip PL 77 Tar Pa e c © © c c ¢ ° c So = SparkTech Consultancy Services Introduction ‘The difference between application, program, software? Software. Software is a development process which converts the imaginaries into reality by writingcomes set of programs. Application- A program or group of programs that is designed for the end user. Application software (an application) is a set of computer programs designed to permit the user to perform a group of coordinated functions, tasks, or activities. Application software cannot run on itself but is dependent on system software to execute, Program: A set of instructions telling a computer wht to do. “All applications are programs, but a program is not necessarily an application. For example, Windows Media Player and Firefox, are applications. They have a Graphical User Interfac software System Software Application Sottware Internet software [Used to develop functions. (Used to develop [Used ta develop ‘of hardware devices } ‘organizational oriented Distributed epplications ] Applications me pa {Ierooft} [Sun Micro Systems Product Based Companies Standard Distributed Applications Applications 1. Product based mean universally used |» trea Disk ww Ex Microsoft word 2. Project Based mean L> Not sharable Shoreble Ee sper-market ‘Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pun Contact No: 8855032507 , 8855901508 SparkTech Consultancy Services In IT we develop two types of applications. They are stand alone applications and distributed applications. ‘A stand alone application is one which runs in the context of local disk. All stand alone applications are not sharable. System software and pplication software comes under stand alone plications © System software is used for developing functionality of hardware devices. Examples are C and ALP (Assembly Language Programming). ‘+ Application software is used for developing organizations oriented applications. This is also known as backend softwore’s. Examples are dbase, dbase Ill plus, FoxPro, oracle versions released till now. + Internet software is used for developing distributed applications. A distributed application is one which can be accessed across the globe. Distributed application is also one which runs in the contest ofthe World Wide Web. To develop distributed applications we must use client-server architecture In client-server orchitecture we must hare at least two programs they are client program and server program. A client program is one which always makes a request to get the service from the server. A server program is one which will do three operations receiving the request from client, processing the client request and sending the response to the client. All the above three operations are performed by the server concurrently. in order to exchange the data between client and server we must use a protocol called http (hypertext transfer protocol). Protocol is a set of values which are defined to exchange the data between client and server either locally or remotely. In order to develop distributed applications, two software companies came forward whose names are Microsoft System and Sun Micro System. (Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune -411058 Contact No: 8855032507 , 8855901508 Page 2 SparkTech Consultancy Services ‘As per the sun micro system standard the java language is divided into three types. 1) J2SE/SE{java 2 standard edition) 2) J2E6/sEE(java 2 enterprise edition) 3) J2ME/sME{java 2 micro edition) 22st By using j2se we are able to develop the standalone applications. Ec: notepad, WordPad, paint, Google Talk....ete Standalone applications:- 1). Standalone applications are the java applications which don't need the client server architecture. 2) The standalone applications applicable for the only one desktop hence itis called desktop applications or window based applications, 3) For the standalone applications doesn’t need internet connections. 4)_Itis a focal application it doesn’t need any other external application support. '5)_ This type of the applications we cam launch by using the command line or by using the executable jar Client Database REE By using j2ee we are able to develop the web based applications. Ex Gmail, yahoo mail, bank, reservation vnunet ‘Web-applications:- 41) Web applications are the java applications which needs client and server concept. 2), Web applications must need the internet connections to access the application. 3). The application which is present in the internet is called the web application. 4) Web application can be launched by using HTTP driven, HTTP request sent to the Servlet present in the server side. (fice No-A/20% Vital Complex, Above So Motors, Near selie pain Bhumkar ChaoleNavhe Pune a1 100 Contact No: 8855032507, 8835901508 Page 3 SparkTech Consultancy Services Web application architecture: Client server database itt | foauest og < cs 8 Hibernate vencty J] Usedto y ‘response store the data L___ lent ‘The person who is sending the request is called client. Al web browsers come unde the clients cr InternetExploral, MozlaFrefox, opera......ete Server: ‘The server contains the applications. The main purpose of the server is It will contain the application, Take the request from the client. © Based on the taken request it will identify the project resource and execute that project, By executing the project some response will be generated that response is dispatched to the client browser. xc- Tomcat GlassFish, WebLogic JBOSS, WebSphere......ete DataBase:- DataBase is used to store the det ete. x:- Oracle MySql ke client details, application details, registration ete By using j2me we are able to develop the applications that applications only run on mobile devices. ‘Asa software engineer we must know these technologies: HTML(Hyper Text Markup Language): It's used for web pages designing, Introduced by World Wide Web Consortium and developed by Tm Bernestee Te —— S . Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune -#11058 Contact No: 8855032507 , 8855901508 Page 4 Office No- A/201 Vithhal Compl SparkTech Consultancy Services There are three levels of support Level 1Receiveing issues over phone /emall/ apps , registering them int issue management appstTcketng tools ike ~ BMC Remedy, HPSM, Clarify CRM Bridge, Service Now ete) and escalating them Itis known as Problem Managment and the objects to see that the issue gets resolved. Level 2: Level 1 will escalate sues to Level 2 Level 2 should be having rights and privileges to make changes to the infratructure, They wilinvesizate the issue and take actions to fx the issue if they are privileged to do so. They may have to escalate to other L2 teams. Li has to track the process. Level 3 Amissue reaches this team is the fix involves making changes to the IT infrastructure or code and would need an approval from various Administrative Heads Application Support Application Support could involve all the three levels of support. There is a support team for as 2 of Applications. L1 and (2 Support might involve investigating and fixing issues that may impact a particular User, This could require the support person to use admin privileges within the App or through database or operating system level. The actual ob can be delegated to relevant support Team. Level 3 in ‘Application Support involves development work and one may be asked to fix bugs in the code that may have been raised by L1 or L2. They may also be asked to carry out minor mods or enhancements in code as asked by the Busines. Product Support ‘This involves all levels of support. One can have more than one clients. Itis provided to those clients who have warranty or have support contracts. The nature of support could be product related, operating system issues or software related. Knowledge of the product is essential Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune 411058 Contact No: 8855032507 , 8855901508 Page 5 SparkTech Consultancy Services Technical Support Again this involves all levels of support. Unlike Product Support, Technical Support could involve many products, software, operating systems. Itis necessary to have the knowledge of the domain in which tone is working. ifthe support relates to networking then one is expected to know all about networking and the operation of individual networking device Suppose: You are @ company ABC'td with @ product which islets say MS-Office. Now you sold these product toa company XYZ td Now XYZ is facing issues during installation of MS-Office in their ofice ‘They wil contact the technical support to resolve their queries if they are not able to solve ther issues it will be moved to the next level whichis product support which finds out the issue is caused by MS-Word so they will contact the MS-word application support team which will work n the issues with MS-word to fix the issue facing by XVZItd. Introduction to Linux Linux Is an open source operating system, Similar to any other operating systems like Windows, MAC ‘etc. An operating system is a program which manages the communication between user software and hardware. ‘There are following major parts in a Linux system: kernel — A Linux Kernel is the core of any operating system, which directly interacts with the hardware. It manages all the system resources like “Memory”, "CPU", “Processes” and Attached peripheral devices to the system. Office No- A/201 Vithhal Complex, Above Sai Motors, Near self point Bhumkar Chauk, Narhe Pune ~411058 Contact No: 8855032507 , 8855901508 Page 6 SparkTech Consultancy Services Bootloader ~ The Bootloader also called Boot Manager. A program that handles the boot process for any Linux computer. It loads the operating system from the storage device to memory. Shell ~ A shell is @ command line interpreter, which provides the directly interacts users via standard input devices like a keyboard. Desktop Environment ~ These provide the Graphical interface of a shell to users to work. This is Similar to Windows desktop environment, Linux Architecture The Linux system works basically on 4 layers. Fitst view the diagram below, which is showing the architecture of a Linux System. Linux System Architecture Office No- 1/201 Vithhal Complex, Above Sat Motors, Near selfie point Bhumkat Contact No: 8855032507 , 8855901508 SparkTech Consultancy Services Hardware ~ Hardware consists ofall physical devices attached to the System. For example: Hard disk drive, RAM, Motherboard, CPU etc Kernel - Kernel is the core component for any (Linux) operating system which directly interacts with the hardware, ‘Shell ~ Shell is the interface which takes input from Users and sends instructions to the Kernel, Also ‘takes the output from Kernel and send the result back to output shell, Applications - These are the utility programms which runs on Shell, This can be any application like Your web browser, media player, text editor etc. Linux system is basically divided in three major components: Linux File System (LFS), Shell and Kernel. Kernel is the core program which manages system hardware devices. Shell provides user interface to run the commands. File system organizes the data in systematic way. Collectively LES, Shell and kernel provides @ way to interact with system and an environment to run commands and manage data. Linux File System (LFS) Linux accesses every object as file, Files are systematically organized in directories. Linux file system starts with the root (/) directory. All files and directories are created and managed under this (root) directory, Since root directory stands on the top of file system, it has no parent directory. Besides root directory, every directory has a parent directory. Linux allows us to create as many files and directories as we want. We can create files under the existing directories or may create new directories System Directories System directories contain files, software, applications and scripts which are required to run and maintain the Linux. System directories are automatically created during the installation Following figure illustrates same important system directories with their location in LFS. Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune ~411058 Contact No: 3855032507 , 8855901508 Page 8 SparkTech Consultancy Services Linux Directory Structure (File System Structure) Advertisements DirectoryDescription / First directory in Linux File System. Itis also known as root directory or main directory. All files ‘and directories are created and managed under this directory. ‘home Default directory for user data. Whenever we add a new user, Linux automatically creates a home directory matching with his username in this directory. Linux puts user in his home directory just after the login. /root This is the home directory of root user. Root user is the super user in Linux. For security reasons, Linux creates a separate home directory for the root user. [rin This directory contains standard commands files. Commands stored in this directory are available for all users and usually do not require any special permission to run. /sbin This directory contains system administration commands files. Commands stored in this. directory are available only for super users and usually require special privilege to run. Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Contact No: 8855032507 , 8855901508 Page 9 SparkTech Consultancy Services Just This directory contains user application software files, third party software and scripts, document files and libraries for programming languages. Jvat This directory stores variable data files such as printing jobs, mail box etc. Jetc This directory contains system configuration files. [eoot This directory contains Linux boot loader files, Jmnt This directory is used to mount the remote file system and temporary devices such as CD, DVD and USB. [dev This directory contains device files. Usually files in this directory are dynamically generated and should be never edited. [tmp This directory provides temporary location for applications. Unix vs Linux — Difference between Unix and Linux. Rca eae ene Unix primarily uses Command Line Interface. Linux OS is portable and can be executed in different Hard Unixis not portable. Drives. a Unix has a rigid requirement of the Hardware. Hence, cannot be installed on every other Uinuxis very flexible and can be installed on most of the Home Based Pes. machine. Linux is mainly used in Home Based PC, Mobile Phones, Unix is mainly used in Server Systems, Desktops, etc. Mainframes, and High-End Computers. Different Versions of Linux are: Ubuntu, Debian, OpenSuse, Different Versions of Unix are: AlS, HP-UX, BSD, (Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune -41 1058, Contact No: 8855032507 , 8855901508 Page 10 SparkTech Consultancy Services Redhat, Solaris, et. Iris, ete Linux Installation is economical and doesn't require much Unix installation is comparatively costlier as it. specific and high-end hardware. requires more specific hardware circuitry. The filesystems supported by Linux are as follows: xfs, ramfs, nfs, vfat, cramfsm ext3, ext, ext2, extl, ufs, autofs, devpts, ntfs ‘The Filesystems supported by Unix are as follows: 2fs, js, hx, eps, xfs, aps, xfs, vis, Linux is developed by an active Linux Community worldwide. _Unixis developed by AT&T Developers. Processes in linux A process refers to a program in execution; t's a running instance of a program. its made up of the program instruction, data read from files, other programs or input from a system user. Types of Processes There are fundamentally two types of processes in Linux: + Foreground processes (also referred to as interactive processes) ~ these are initialized and controlled through a terminal session. In other words, there has to be a user connected to the system to start such processes; they haven't started automatically as part of the system functions/services ‘+ Background processes (also referred to as non-interactive/automatic processes) ~ are processes not connected to a terminal; they don't expect any user input. What is Daemons These are special types of background processes that start at system startup and keep running forever asa service; they don’t die. They are started as system tasks (run as services), spontaneously. However, they can be controlled by a user via the init process. 11058 Contact No: 8855032507 , 8855901508 Page 11. Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Nathe Pune SparkTech Consultancy Services Process State admitted interrupt erminated) ag read runnin: exit Cieaay ) — —.Cruming) scheduler dispatch _ vO vO or or event wait event completion Coating) : States of a Process in Linux During execution, a process changes from one state to another depending on its environment/circumstances. In Linux, a process has the following possible states: = Running ~here it’s either running itis the current process in the system) or it’s ready to run (it’s waiting to be assigned to one of the CPUs) ‘+ Waiting ~in this state, a process is waiting for an event to occur or for a system resource, Additionally, the kernel also differentiates between two types of waiting processes; Interruptible ‘waiting processes ~ can be interrupted by signals and uninterruptible waiting processes ~ are ‘waiting directly on hardware conditions and cannot be interrupted by any event/signal. * Stopped — in this state, a process has been stopped, usually by receiving a signal. For instance, a process that is being debugged. = Zombie ~ here, a process is dead, it has been halted but it’s still has an entry in the process table, Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumnkar Chauk, Narhe Pune -411058 Contact No: 8855032507 , 8855901508 Page 12, SparkTech Consultancy Services 1. Chmod Command ‘The chmod command is used to change the file or directory access permissions. To know about the access permissions of a file or directory, use the Is -| command as shown below: $154 sample.sh srwe-rw-t-- 1 matt deploy 94 Oct 4.03: sample.sh Here in the above example: Use matt has the read, write and execute permissions on the file, Group deploy has read and write permissions. Others have only the read permission, File and Directory permissions: Every Linux system have three types of owners 1. User: A user is the one who created the file. By default, whosoever, creates the file becomes ‘theowner of the file. A user can create, delete, or modify the file. 2. Group: A group can contain multiple users. All the users belonging to a group have same. accesspermission for a file, 3. Other: Any one who has access to the file other than user and group comes in the categoryofother. Other has neither created the file nor is 2 group member. ‘There are three different permissions. They are: + Read (4): Permitted to read the contents of the file. In case of directory, you can view all the files and sub-directories in that directory. + Write (2): Permitted to write to the file. In case of directory, you can create files and sub- + Exeter the lesa reprom/shall et Inet of resto, You can enero that directory | permission ‘Value ‘ona file ona directory [Firesd) 4 [read ie content feat) wad Greclony content fa) | wharte) | 2 | change ie convent (i) ereate ein dvecory Rauch) | x (execute) 1 execute the file enter the directory (cd) Here in the above, the numbers in the brackets represents the numeric values for the corresponding permissions. f you want to have a combination of permissions add the required numbers. For example, for read and execute, itis 4¥ Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune #11056, Contact No: 8855032507 , 8855901508 Page 13 SparkTech Consultancy Services The syntax of chmod command is chmod [options] mode filename ‘THe important options are: -f: recursively change the permissions of a directory. -v: Verbose Chmod Examples in Linux / Unix: 1. Give read, write and execute permissions to everyone. Read, write and execute: 4+2+1=7 $ chmod 777 sample.sh Alternatively, you can use the symbolic representation to give the permissions. chmodugotrwx sample.sh We will see more details about the symbolic representation later. 2. Give read permission to user, write permission to group and execute permi $ chmod 421 sample.sh 3, Recursive permissions to directory To give read and write permissions to all the users to a directory (including files and subdirectories) use the recursive option-R. chmod -R 666 /dir ‘Symbolic Representation of Permissions: ‘The following symbols are used to represent the users, groups and others: Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfe point Bhumkar Chauk, Narhe Pune ~411058 Contact No: 8855032507 , 855901508 Page 14 SparkTech Consultancy Services + wsUser + :Group + 0: Others a: All (user, group and others) ‘The following symbols represent the permissions: © riread © wewrite + xzexecute The following symbols represent the permissions grant or revoke: ‘+ +: Additional permissions. Selected permissions are added ‘+ =: Revoke the permissions. Selected permissians are revoked ‘+ =: Specific permissions. Only selected permissions are assigned. Examples: 1. Remove write permission from group $ chmod g-w sample.sh This will only removes the write permission for the group, 2. Add new permission execute to others $ chmodosx sample.sh In addition to the existing permissions, this will add execute permission to others, 3, Give only read permissions to the user $ chmod u=r sample.sh This will remove the existing permissions to the user and gives only write permission to the user. Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk Nathe Pune “411056 Contact No: 8855032507 , 8855901508 Page 15, SparkTech Consultancy Services 2. Umask Command Every file that is created comes with a default set of permissions. If you ever wanted to change that default set of permissions, you can do so with the umask command Default file creation permissions willbe obtained from the umask value. Mask of umask will give the actual permissions. Masks subtract valve from 7 IF umask s 021, then the default file permissions are 7.0,7-2,7-4 ie. 756 are the permissions (rwarxrw-) The current umask value can be had by: $ umask 0227 first O indicate the value is octal umask can be assigned new value by: $$ umask 042, Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune -411058 Contact No: 8855032507 , 8855901508 Page 16 SparkTech Consultancy Services 3. chown command chown command changes the user and/or group ownership of far given file, The syntax is: 4) chown:To change Owner of the File/Directory Syntax:SchownOwner_Name File/Directory chown owner-user file chownowner-user:owner-groupfile chownowner-user:owner group directory chown options owner-user:owner-groupfile ExamplesFirst, lst permissions for demo.txt, enter. Als demo.txt Sample outputs: ~rw-r--t~ 1 root root 0 Aug 31 05:48 demo.txt In this example change file ownership fo vivek user and list the permissions, run # chownvivek demo.txt #ls-Idemo.txt Sample outputs: -rw-r=~ 1 vivek root 0 Aug 31 05:48 demo.txt In this next example, the owner is set to vivek followed by a colon and a group onwership is also set to vivek group, run: # chown vivekwvivek demo.txt #ls-Ademoaxt Sample outputs: vivekvivek 0 Aug 31.05:48 demo.txt Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune -411058 Contact No: 8855032507 , 8855901508 Page 17 SparkTech Consultancy Services In this example, change only the group of file. Te do s0, the colon and following GROUP-name ftp are sgiven, but the owner is omitted, only the group of the files is changed: 4H chown :ftp demo.txt \s-1demo.tet Sample outputs: -rwer-r~ 1 vivek ftp 0 Aug 31 05:48 demo.txt Please note that if only a colon is given, or if NEW-OWNER is empty, neither the owner nor the group is changed: # chown: demo.txt In this example, change the owner of /foo to “root”, execute: 4 chown root /foo Likewise, but also change its group to “httpd”, enter: chownroot:httpd /foo Change the owner of /foo and subfiles to “root”, run’ # chown -R root /u ‘Where,-R- Recursively change ownership of directories and their contents. ‘Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune ~411058 Contact No: 8855032507 , 8855901508 Page 18 SparkTech Consultancy Services 4. cherp To change Group of the File/Directory ‘+ Syntax:$ chgrp Group_Name File/Directory Office No- 4/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune -411058 Contact No: 8855032507 , 8855901508 Page 19 SparkTech Consultancy Services 5. Date Command Date command is used to print the date and time in unix. By default the date command displays the date in the time zone that the unix operating system is configured, Date Command Examples: {Write a unix/linux date command to print the date on the terminal? date Mon Jan 23 01:37:54 PST 2012 2. Write aunix/linux date command to set the date in unix? You can change the date and time by using the -s option to the date command. date -s “01/01/2000 12:12:12" 3.date command to display only the date part and ignore the time part? date '+%6m-%d-96Y" 01-23-2012 ‘You can format the output of date command by using the %. Here %m for month, Séd for day and %Y for year. 4.date command to display only the time part and ignore the date part? date '+96H:4MKS! 01-48-45 Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune -411058 Contact No: 8855032507 , 8855901508 Page 20 Here $6 is for hours in 24 hour format, %M is for minutes and %S for seconds 5. Write a unix/linux date command to format both the date and time part. SparkTech Consultancy Services >date "4%6m-%6d-96Y 96H-96M-%4S! 01-23-2012 01-49-59 Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Nathe Pune Contact No: 8855032507 , 8855901508 11058 Page 21 SparkTech Consultancy Services 6. Cal Command To display current month's cate EXAMPLES To display current month's calendar sent To display feb 2015 calendar 1234567 15 16 17 18 19 20 21 22 23 24 25 26 27 28 To display complete year calendar. Scat You can print the calendar of the entire current year using the -y option of cal command, Office No- A/201 Vithhal Complex, Above Sai Motors, Near selfie point Bhumkar Chauk, Narhe Pune 411058 Contact No: 8855032507 , 8855901508 Page 22 SparkTech Consultancy Services Pores eres cote 3. Print the calendar of a particular month and/or year If you want 1o print the eaenas n month an year. you ean do so by For example. 20 print the calendar of Jiune 2017, you can ase any of the below three + cal 6201 = eal -d 20) labhishek@linuxhandbook:-$ cal 6 2017 rarer tres reas Cord es rr) eee Pa et) Office No- A/201 Vithhal Complex, Above Sai Motors, Near self point Bhumkar Chauk, Narhe Pune -411058 Contact No: 8855032507 , 8855901508 Page 23 SparkTech Consultancy Services 4. Print three months view ‘You can print the previous month, current month and the next month's calendar in one go with -2 option. eras) bar TLE ae

You might also like