{"id":359,"date":"2014-07-21T00:00:00","date_gmt":"2014-07-21T00:00:00","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2014\/07\/21\/linux-commands-for-user\/"},"modified":"2021-02-27T09:52:13","modified_gmt":"2021-02-27T09:52:13","slug":"linux-commands-for-user","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/","title":{"rendered":"Linux Commands for User | Linux User Commands Reference"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3671 aligncenter\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-user.png\" alt=\"linux-commands-user\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-user.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-user-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><strong>General Commands Not Used Frequently<\/strong><br \/>\ncal \u2013 The Calender<br \/>\nbc \u2013 The Calculator<br \/>\nfile \u2013 knowing the file types<br \/>\ncmp \u2013 Comparing two files.<br \/>\ncomm \u2013 Common in two files<br \/>\ndos2unix and unix2dos \u2013 Converting between dos and unix<br \/>\nstat &#8211; Display file or file system status such as Access, Modify,Change, users and more<br \/>\n# stat &lt;fileName&gt; unix Command<\/p>\n<p><strong>General Commands Frequently Used<\/strong><br \/>\nScript \u2013 recording your session<br \/>\nPasswd \u2013 change your password<br \/>\nEcho\u00a0 &#8211; Displaying the message<br \/>\nPrintf &#8211; Displaying the message<br \/>\nwho \u2013 Who are the Users<br \/>\nwho am I \u2013 To know my user name<br \/>\nuname \u2013 Knowing your machine characteristics<br \/>\n# uname \u2013a\u00a0 &#8211; To Print all info.<br \/>\ntty \u2013 knowing your terminal<br \/>\npwd \u2013 Checking Current Directory<br \/>\ncd &#8211; changing the current Directory<br \/>\nmkdir \u2013 Making directories<br \/>\nrmdir \u2013 removing directories<br \/>\n<strong>ls \u2013 Listing Directory Contents<\/strong><br \/>\n# ls \u2013F \u2013 Marks executables with *, directories with \/ and symbolic links with @ at the end of file name.<br \/>\n# ls \u2013 a \u2013 Shows all filesnames including beginning with a dot.<br \/>\n# ls \u2013R \u2013 Recursive display list of files and folders<br \/>\n# ls -1 \u2013 one filename in each line<br \/>\n# ls \u2013l long listing + time of last file modification<br \/>\n# ls \u2013t Sorts filenames by last modification time<br \/>\n# ls \u2013u \u2013 Sorts filenames by last access time<br \/>\n# ls \u2013I \u2013 Displays inode number<br \/>\n# ls \u2013lc \u2013 Time of last inode modifcation<\/p>\n<p><strong>Cat \u2013 Displaying and creating Files<\/strong><br \/>\n# cat filename \u2013 Displaying file contents<br \/>\n# cat \u2013n filename &#8211; Displaying file contents with line numbers<br \/>\n# cat &gt; filename \u2013 To Create a file name<\/p>\n<p><strong>More \u2013 Paging Output<\/strong><br \/>\n# more filename \u2013 To to display the filename contents<\/p>\n<p><strong>Less \u2013 Paging Output<\/strong><\/p>\n<p><strong>wc \u2013 Counting lines, Words and Characters<\/strong><br \/>\n# -l \u2013 Option counts only the number of lines<br \/>\n# -w \u2013 Option counts only the words.<br \/>\n# -c \u2013 Options counts only the characters.<\/p>\n<p><strong>cp \u2013 copying a files<\/strong><br \/>\nOptions<br \/>\n# -p \u2013 Copy the files including preserve the mode, ownership and permissions.<br \/>\n# -R \u2013 Copying Directory Structure<\/p>\n<p><strong>gzip and gunzip \u2013 Compressing and Decompressing Files<\/strong><br \/>\n# gzip filename<br \/>\n# gzip \u2013l \u2013 To find out how much of the compression was archived.<br \/>\n# gzip \u2013d filename \u2013 To Decompress a file<br \/>\n# gunzip filename \u2013 To Decompress a file<br \/>\n# gzip \u2013R dir \u2013 To Compress Recursive<\/p>\n<p><strong>Tar \u2013 The archival Program<\/strong><br \/>\n# -c \u2013 To create a archive<br \/>\n# -x \u2013 Extract files from archive<br \/>\n# -t \u2013 Display fils in archive<br \/>\n# -v \u2013 verbose<br \/>\n# -f \u2013 name of the arch filename .tar<br \/>\n# tar \u2013cvf filename.tar filename1 filename2<br \/>\n# tar \u2013xvf filename.tar<\/p>\n<p><strong>Create tar and gzip<\/strong><br \/>\n# tar cvf &#8211; foodir | gzip &gt; foo.tar.gz<\/p>\n<p><strong>Un-tar and gunzip<\/strong><br \/>\n# tar -zxvf apache-activemq-5.1.0-bin.tar.gz<\/p>\n<p><strong>Un-tar and uncompress using gunzip<\/strong><br \/>\n# gunzip -c apache-activemq-5.1.0-bin.tar.gz | tar xvf &#8211;<br \/>\nor alternatively:<br \/>\n# gunzip apache-activemq-5.1.0-bin.tar.gz | tar xvf &#8211;<\/p>\n<p><strong>File Attributes<\/strong><br \/>\n<strong>chmod \u2013 Changing File Permission<\/strong><\/p>\n<p>Abbreviations Used by chmod<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"160\"><strong>Category<\/strong><\/td>\n<td valign=\"top\" width=\"160\"><strong>Operation<\/strong><\/td>\n<td valign=\"top\" width=\"160\"><strong>Permission<\/strong><\/td>\n<td valign=\"top\" width=\"160\"><strong>Assigned Number<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"160\">u -user<\/td>\n<td valign=\"top\" width=\"160\">+ &#8211; Assigns Permission<\/td>\n<td valign=\"top\" width=\"160\">r \u2013 Read permission<\/td>\n<td valign=\"top\" width=\"160\">4<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"160\">g -group<\/td>\n<td valign=\"top\" width=\"160\">&#8211; \u00a0&#8211; Assigns Permission<\/td>\n<td valign=\"top\" width=\"160\">w \u2013 Write Permission<\/td>\n<td valign=\"top\" width=\"160\">2<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"160\">o \u2013 other<\/td>\n<td valign=\"top\" width=\"160\">= &#8211; Assigns Permission<\/td>\n<td valign=\"top\" width=\"160\">x \u2013 Execute Permission<\/td>\n<td valign=\"top\" width=\"160\">1<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"160\">a \u2013all(ugo)<\/td>\n<td valign=\"top\" width=\"160\"><\/td>\n<td valign=\"top\" width=\"160\"><\/td>\n<td valign=\"top\" width=\"160\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Example:<br \/>\n# chmod u+x filename<br \/>\n# chmod u+x filename<br \/>\n# chmod ugo+x filename<br \/>\n# chmod u+x filename1 filename2 filename3<br \/>\n# chmod a-x,go+r filename<br \/>\n# chmod 566 filename<br \/>\n# chmod 755 filename<br \/>\n# chmod \u2013R 755 .<br \/>\n# chmod \u2013R a+x *<\/p>\n<p><strong>Chown \u2013 Changing File Ownership<\/strong><br \/>\n# chown username filename<br \/>\nMore example needed.<\/p>\n<p><strong>Shell\u2019s Wild-Cards<\/strong><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"149\"><strong>Wild-Card<\/strong><\/td>\n<td valign=\"top\" width=\"489\"><strong>Matches<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\"><strong>*<\/strong><\/td>\n<td valign=\"top\" width=\"489\">Any numbers of characters including none<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\"><strong>?<\/strong><\/td>\n<td valign=\"top\" width=\"489\">A single character<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\"><strong>[ijk]<\/strong><\/td>\n<td valign=\"top\" width=\"489\">A single character \u2013 either I,j or k<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\"><strong>[x-z]<\/strong><\/td>\n<td valign=\"top\" width=\"489\">A single character that is within the ASCII range of the characters x and z<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\"><strong>[!ijk]<\/strong><\/td>\n<td valign=\"top\" width=\"489\">A single character that is not an I,j, or k<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\"><strong>[!x-z]<\/strong><\/td>\n<td valign=\"top\" width=\"489\">A single character that is not within the ASCII range of the characters x and z<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\"><strong>\u00a0<\/strong><\/td>\n<td valign=\"top\" width=\"489\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Ps \u2013 Process Status<\/strong><br \/>\n<strong>Options to ps<\/strong><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>POSIX Options<\/strong><\/td>\n<td valign=\"top\" width=\"480\"><strong>Significance<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>-f<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Full listing showing the PPID of each process<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>-e or \u2013A<\/strong><\/td>\n<td valign=\"top\" width=\"480\">All Process including user and Systems<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>-u usr<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Process of user usr only<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>-a<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Processes of all users excluding processes not associated with terminal<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>-l<\/strong><\/td>\n<td valign=\"top\" width=\"480\">A long listing showing memory-related information<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Example<\/strong><br \/>\n# ps -ef<br \/>\n# ps \u2013u sumit<br \/>\n# ps \u2013a<br \/>\n# ps \u2013e<br \/>\n# ps -A &#8211; ps command will report a snapshot of the current processes. To select all processes use the -A<br \/>\n# ps -Al &#8211; Show Long Format Output<br \/>\n# ps -AlF &#8211; To turn on extra full mode (it will show command line arguments passed to process):<br \/>\n# ps axu &#8211; Print All Process On The Server<br \/>\n# ps -U vivek -u vivek u &#8211; See Every Process Running As User Vivek<br \/>\n# ps -p 55977 -o comm= &#8211; Display The Name of PID 55977<br \/>\n# ps -auxf | sort -nr -k 4 | head -10 &#8211; Find Out The Top 10 Memory Consuming Process<br \/>\n# ps -auxf | sort -nr -k 3 | head -10 &#8211; Find Out top 10 CPU Consuming Process<\/p>\n<p># $! \u2013 Store the PID of the last background jobs<br \/>\n# echo $$\u00a0 &#8211; To Know the PID of current Shell<br \/>\n# echo $SHELL \u2013 To Know the Current Shell<br \/>\n# System process easily identifies the ? in the TTY coloumn.<br \/>\n# Mechanism of Process Creation<br \/>\nFork<br \/>\nExec<br \/>\nWait<\/p>\n<p><strong>&amp; and nohup \u2013 Ruunning jobs in background<\/strong><br \/>\n# nohup sort emp.lst $<\/p>\n<p><strong>nice \u2013 Job execution with low priority<\/strong><br \/>\nKernel decides how much processor time is required for a process based on the nice value. Possible nice value range is: -20 to 20. A process that has a nice value of -20 is very high priority. The process that has a nice value of 20 is very low priority.<br \/>\nUse ps axl to display the nice value of all running process as shown below.<br \/>\n# ps axl<br \/>\n# nice command is used with &amp; operator to reduce the priority of jobs<br \/>\n# nice script.sh &amp;<br \/>\n# .\/nice-test.sh &amp;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Default the nice value of 0<br \/>\n# nice -10 .\/nice-test.sh &amp;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Nice value is 10 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Low priority.<br \/>\n# nice &#8211;10 .\/nice-test.sh &amp;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Nice value is -10\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 High priority.<\/p>\n<p><strong>Kill \u2013 killing the process<\/strong><br \/>\n# kill PID<br \/>\n# kill PID1 PID2 PID3<br \/>\n# kill $i \u2013 Killing the last background process<br \/>\n# kill \u2013s KILL PID \u2013 recommended way for killing (SIGKILL)<br \/>\n# kill -9 PID \u2013 same as above but not recommended. (SIGKILL)<br \/>\n# kill -9 $$\u00a0 -$$ store the PID of current shell<br \/>\n# kill \u2013s KILL 0 \u2013 kill all the process including the login shell.<br \/>\n# kill \u2013l \u2013 To View the list of all signal names and numbers that are available on your machine.<br \/>\n# kill %1 \u2013 Kill first background jobs<\/p>\n<p><strong>Jobs <\/strong><br \/>\nList the background jobs in following fashion<br \/>\n[3] +\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 running\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 command<br \/>\n[1] &#8211;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 running\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 command<br \/>\n[2] \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 running\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 command<\/p>\n<p><strong>bg \u2013 Convert Jobs to background<\/strong><br \/>\n# if you have invoked a command and the prompt has not yet return, you can suspend the job by pressing Ctrl-Z. Observe that job has not been terminated yet; its onl y suspended (\u201cstopped\u201d). Now you can use bg command to push the current foreground job in the background.<br \/>\n# bg %2 \u2013 Sends second job to background<br \/>\n# bg %sort &#8211; Sends sort job to background<\/p>\n<p><strong>fg \u2013 bring background job to foreground<\/strong><br \/>\n# fg \u2013 To bring most recent job to forground<br \/>\n# fg %1 \u2013 Bring First job to foreground<br \/>\n# fg %2 \u2013 Bring second job to foreground<br \/>\n# fg %sort &#8211; Bring sort job to foreground<\/p>\n<p><strong>at \u2013 On time execution<\/strong><br \/>\n# at 14:08<br \/>\nat &gt; script.sh<br \/>\n[ctrl-d]<\/p>\n<p><strong>Batch \u2013 execute when system resources are available<\/strong><br \/>\n# batch &lt; script.sh<\/p>\n<p><strong>Cron \u2013 Schedule and run jobs periodically<\/strong><br \/>\n# crontab \u2013e \u2013 To Edit the cron tab<br \/>\n# crontab \u2013l \u2013 To Display the cron tab<br \/>\n# crontab cron.tx \u2013 cron.txt contains cron commands<br \/>\n# crontab \u2013r \u2013 To Remove the cron<\/p>\n<p>Format of crontab \u2013 TODO<\/p>\n<p><strong>Customizing the environment<\/strong><\/p>\n<p># set \u2013 set statemtent display a complete list of all environment variable<br \/>\n# PATH =$PATH:\/usr\/xpg4\/bin \u2013 Adding new value to old values<br \/>\n# PS1 =\u201dC&gt; \u201c \u2013 To Change the prompt<br \/>\n# PS1=\u2019[$PWD] \u2018 \u2013 To Change the prompt to pwd<br \/>\n# alias cp=\u201dcp \u2013I\u201d \u2013 To Set the alias in bash<br \/>\n# history \u2013 To See the history<br \/>\n# IFS \u2013 Field Separators for commands and arguments<br \/>\n# !! \u2013 Repeat Previous commands<br \/>\n# !2 \u2013 Repeat commands 2 from history output<br \/>\n# !-2 \u2013 Execute the commands prior to previous one<br \/>\n# !v \u2013 Execture very last commands beginning withg v<br \/>\n# $_ &#8211; Using last arugement of previous commands<br \/>\n# mkdir raj<br \/>\n# cd $_<\/p>\n<p><strong>ln \u2013 Hard Links and Softlinks<\/strong><br \/>\n# ln \/usr\/bin\/perl\u00a0 \/usr\/local\/bin\/perl \u2013 To create a hard links from src to dest<br \/>\n# ls \u2013I\u00a0 &#8211; To Display the node number of files<br \/>\n# ln \u2013s \/usr\/bin\/perl\u00a0 \/usr\/local\/bin\/perl \u2013 To Create a soft link<\/p>\n<p><strong>umask \u2013 default file and directory permission<\/strong><br \/>\n# When you create a files and directories, the permission assigned to them depends on rge system\u2019s default setting..<br \/>\n# unix has default 666 for regular files &amp; 777 for directories<br \/>\n# umask \u2013ENTER<br \/>\n# 022<br \/>\nThis is an octal number which has to be subtracted from system default to obtain the actual default. This becomes 644 (666-022) for ordinary files and 755 ( 777 -022) for directories.<br \/>\n# User can set the umask such as umask 023.<\/p>\n<p><strong>touch \u2013 Changing the time stamp<\/strong><br \/>\n# touch emp.lst \u2013 Create a file name called emp.lst<br \/>\n# touch 02161430 emp.lst \u2013 To Change the time stamp of file for MMDDhhmm format<br \/>\n# touch \u2013a 02161430 emp.lst \u2013 To Change the access time stamp of file for MMDDhhmm format<br \/>\n# touch \u2013m 02161430 emp.lst \u2013 To Change the modification time stamp of file for MMDDhhmm format<\/p>\n<p><strong>find \u2013 Locating files<\/strong><\/p>\n<p><strong>Expression Used by find.<\/strong><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"149\">Expression<\/td>\n<td valign=\"top\" width=\"489\">Use<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-inum n<\/td>\n<td valign=\"top\" width=\"489\">Having inode number n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-type x<\/td>\n<td valign=\"top\" width=\"489\">if of type x can include files, directories or symbolic link<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-type f<\/td>\n<td valign=\"top\" width=\"489\">If an ordinary file<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-perm nnn<\/td>\n<td valign=\"top\" width=\"489\">If octal permission match nnn completely<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-links n<\/td>\n<td valign=\"top\" width=\"489\">If having n links<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-user usname<\/td>\n<td valign=\"top\" width=\"489\">If owner by usname<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-group gname<\/td>\n<td valign=\"top\" width=\"489\">If owned by group gname<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-size +x[C]<\/td>\n<td valign=\"top\" width=\"489\"><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-mtime \u2013x<\/td>\n<td valign=\"top\" width=\"489\">If modified in less than x days<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-newer filename<\/td>\n<td valign=\"top\" width=\"489\">If modified after filename<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-mmin \u2013x<\/td>\n<td valign=\"top\" width=\"489\">If modified in less than x minutes<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-atime +x<\/td>\n<td valign=\"top\" width=\"489\">If accessed in more than x days<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-amin +x<\/td>\n<td valign=\"top\" width=\"489\">If accessed in more than x minutes<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-name filename<\/td>\n<td valign=\"top\" width=\"489\">Filename<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\"><strong>Action<\/strong><\/td>\n<td valign=\"top\" width=\"489\"><strong>Significance<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-print<\/td>\n<td valign=\"top\" width=\"489\">Prints selected file on standard output<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-ls<\/td>\n<td valign=\"top\" width=\"489\">Executes ls \u2013lids commands on selected files<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-exec cmd<\/td>\n<td valign=\"top\" width=\"489\">Executes UNIX command cmd followed by {} \\;<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"149\">-ok cmd<\/td>\n<td valign=\"top\" width=\"489\">Like \u2013exec, except that command is executed after user confirmation<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Example<\/strong><\/p>\n<p>Change File Permissions Recursively<br \/>\n# find . -type f -exec chmod 644 {} \\;<br \/>\n# find . -type d -exec chmod 755 {} \\;<br \/>\n# find . -name Configuration.php -exec chmod 666 {} \\;<\/p>\n<p>Find files modified in the last 48 hours, and in current folder and one level below<br \/>\n# find -maxdepth 2 -type f -mtime -2<\/p>\n<p>To find all files modified in the last 24 hours (last full day) in a particular specific directory and its sub-directories:<br \/>\n# find \/directory_path -mtime -1 \u2013print<\/p>\n<p>To find all files with regular file types only, and modified in the last 24 hours (last full day) in current directory and its sub-directories:<br \/>\n# find \/directory_path -type f -mtime -1 \u2013print<br \/>\n# find . -type f -mtime -1 \u2013print<\/p>\n<p>To find all files that are modified today only (since start of day only, i.e. 12 am), in current directory and its sub-directories:<br \/>\n# touch -t `date +%m%d0000` \/tmp\/$$<br \/>\n# find \/tmefndr\/oravl01 -type f -newer \/tmp\/$$<br \/>\n# rm \/tmp\/$$<\/p>\n<p>To find all files in \/home\/user\/demo directory<br \/>\n# find \/home\/user\/demo -type f \u2013print<\/p>\n<p>To find all files in \/home\/user\/demo directory with permission 777, enter:<br \/>\n# find \/home\/user\/demo -type f -perm 777 \u2013print<\/p>\n<p>Apply new permission using the -exec option as follows:<br \/>\n# find \/home\/user\/demo -type f -perm 777 -print -exec chmod 755 {} \\;<\/p>\n<p>To select directories and subdirectories use the following syntax:<br \/>\n# find \/var\/www\/html -type d -perm 777 -print -exec chmod 755 {} \\;<\/p>\n<p>This first Linux find example searches through the root filesystem (&#8220;\/&#8221;) for the file named &#8220;Chapter1&#8221;. If it finds the file, it prints the location to the screen.<br \/>\n# find \/ -name Chapter1 -type f \u2013print<\/p>\n<p>A nice thing to know is that on Linux systems and modern Unix system you no longer need the -print option at the end of the find command, so you can issue it like this:<br \/>\n# find \/ -name Chapter1 -type f<\/p>\n<p>This next find command searches through the \/usr and \/home directories for the file named Chapter1:<br \/>\n# find \/usr \/home -name Chapter1 -type f<\/p>\n<p>To search in the current directory, and all subdirectories, just use the . character to reference the current directory in your find commands, like this:<br \/>\n# find . -name Chapter1 -type f<\/p>\n<p>This next command searches through the \/usr directory for all files that begin with the letters Chapter, followed by anything else. The filename can end with any other combination of characters. It will match filenames such as Chapter, Chapter1, Chapter1.bad, Chapter-in-life, etc.:<br \/>\n# find \/usr -name &#8220;Chapter*&#8221; -type f<\/p>\n<p>This next command searches through the \/usr\/local directory for files that end with the extension .html. These file locations are then printed to the screen.<br \/>\n# find \/usr\/local -name &#8220;*.html&#8221; -type f<\/p>\n<p>To find all directories named build under the current directory, use this command:<br \/>\n# find . -type d -name build<\/p>\n<p>This command searches through the htdocs and cgi-bin directories for files that end with the extension .cgi. When these files are found, their permission is changed to mode 755 (rwxr-xr-x). This example shows that the find command can easily search through multiple sub-directories (htdocs, cgi-bin) at one time.<br \/>\n# find htdocs cgi-bin -name &#8220;*.cgi&#8221; -type f -exec chmod 755 {} \\;<\/p>\n<p>Find and display files last modified les than 90 days ago.<br \/>\n# find . -name &#8220;*&#8221; -mtime -3 -print<\/p>\n<p>find everything in your home that has been modified more recently than &#8220;abc.txt&#8221;:<br \/>\n# find $HOME -newer ~joeuser\/lastbatch.txt<\/p>\n<p>For finding only files from all directories recursively<br \/>\n# find .\/ -type f | wc -l<\/p>\n<p>For finding only files from all directories recursively<br \/>\n# find .\/ &#8211; type d | wc -l<\/p>\n<p>How to Return a message when a file is not found using find command? OR<br \/>\nFind command return type OR<br \/>\nwhen the file is not found i want it to return some value OR<br \/>\n# find . -name raj.txt &gt; raj.txt<br \/>\n# counter= `cat abc.txt | wc -l&#8217;<br \/>\n# if [$counter -gt 0]<br \/>\n# then<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 echo &#8220;File is found&#8221;<br \/>\n# else<br \/>\n#\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 echo &#8220;File is not found&#8221;<br \/>\n# fi<br \/>\n<strong>That&#8217;s nice, but what if I want to see the last modification time of these files, or their filesize? No problem, I just add the &#8220;ls -ld&#8221; command to my find command, like this:<\/strong><br \/>\nfind . -name &#8220;*.pl&#8221; -exec ls -ld {} \\;<\/p>\n<p>Count Total number of files in Directory and Subdirectory<br \/>\n# find . -type f | wc \u2013l<\/p>\n<p>Count Specific extention files in Directory and Subdirectory<br \/>\n# find . -type f -name \\*.mnp |wc \u2013l<\/p>\n<p>Count only Directory<br \/>\n# find . -type d | wc \u2013l<\/p>\n<p><strong>head \u2013 Displaying the beginning of a file<\/strong><br \/>\n# head \u2013n 3 filename<br \/>\n# vi `ls \u2013t` | head \u2013n 1` &#8211; Opens last modified file for editing<\/p>\n<p><strong>tail \u2013 Displaying the end of a file<\/strong><br \/>\n<strong># tail -3 filename<\/strong><br \/>\n<strong># tail \u2013f filename \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Monitering file live<\/strong><\/p>\n<p><strong>Cut<\/strong><br \/>\n# cut \u2013c 6-12,24-32 filename \u2013 Cutting column<br \/>\n# cut \u2013d \\| -f 2,3 filename\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8211; Cutting fields<br \/>\n# cut \u2013d \u201c|\u201d \u2013f 1,4- filename \u2013To cut out the fields numbered 1,4,5 and 6.<\/p>\n<p><strong>Sort \u2013 Ordering a file<\/strong><br \/>\n<strong>Sort Options<\/strong><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>Option<\/strong><\/td>\n<td valign=\"top\" width=\"518\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-tchar<\/strong><\/td>\n<td valign=\"top\" width=\"518\">Use delimiter char to identify fields<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-k n<\/strong><\/td>\n<td valign=\"top\" width=\"518\">Sorts on nth field<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-k m,n<\/strong><\/td>\n<td valign=\"top\" width=\"518\">Start sort on mth field and end sort on nth field<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-k m.n<\/strong><\/td>\n<td valign=\"top\" width=\"518\">Start sort on nth column of mth field<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-u <\/strong><\/td>\n<td valign=\"top\" width=\"518\">Removes repeated lines<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-n <\/strong><\/td>\n<td valign=\"top\" width=\"518\">Sort numerically<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-r <\/strong><\/td>\n<td valign=\"top\" width=\"518\">Reverse sort order<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-m list<\/strong><\/td>\n<td valign=\"top\" width=\"518\">Merge sorted files in list<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-c<\/strong><\/td>\n<td valign=\"top\" width=\"518\">Checks of file sorted<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"121\"><strong>-o filename<\/strong><\/td>\n<td valign=\"top\" width=\"518\">Place output in file filename<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Examples:<\/strong><br \/>\n# sort \u2013t\u201d|\u201d \u2013k 2 shortlist<br \/>\n# sort \u2013t\u201d|\u201d \u2013r \u2013k 2 shortlist<br \/>\n# sort \u2013t \u201c|\u201d \u2013k 3,3 \u2013k 2,2 shortlist<br \/>\n# sort \u2013t\u201d|\u201d \u2013k 5.7,5.8 shortlist<br \/>\n# sort numfile<br \/>\n# cut \u2013d\u201d|\u201d \u2013f3 filename | sort \u2013u<br \/>\n# sort \u2013m foo1 foo2 foo3<\/p>\n<p><strong>Uniq \u2013 Locate repeated and non-repeated lines<\/strong><br \/>\n# sort dept.lst | uniq<br \/>\n# cut \u2013d\u201d|\u201d \u2013f3 emp.lst | sort | uniq \u2013u \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ( -u selects only lines which is not repeated)<br \/>\n# cut \u2013d\u201d|\u201d \u2013f3 emp.lst | sort | uniq \u2013d \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ( -d selects one copy of repeated lines)<br \/>\n# cut \u2013d\u201d|\u201d \u2013f3 emp.lst | sort | uniq \u2013c<\/p>\n<p><strong>tr \u2013 Translating characters<\/strong><br \/>\n# tr \u2018|\/\u2019 \u2018~-\u2018 &lt; emp.lst | head \u2013n 3 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2013 To replace the | with a ~ and the \/ with a\u00a0 -.<br \/>\n# head \u2013n 3 emp.lst | tr \u2018[a-z]\u2019 \u2018[A-Z]\u2019 \u00a0\u00a0\u00a0 \u2013 Change first three lines from lower to upper.<br \/>\n# tr \u2013d \u2018|\u2019 &lt; emp.lst | head \u2013n 3 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2013 To deleting characters<\/p>\n<p><strong>grep \u2013 Searching for a pattern<\/strong><br \/>\n# grep \u201cdirector\u201d filename1 filename2<br \/>\n# grep \u201cRajesh Kumar\u201d filename1<br \/>\n# grep \u2013i \u2018rajesh\u2019 filename1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 To Ignore case<br \/>\n# grep \u2013v \u2018rajesh\u2019 filename1 &gt; filename2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 To Select all except lines containing patterns<br \/>\n# grep \u2013n \u2018rajesh\u2019 filename1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 To Display line numbers<br \/>\n# grep \u2013c \u2018rajesh\u2019 filename\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Counting line containing pattern<br \/>\n# grep \u2013l \u2018rajesh\u2019 *.lst\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -l options display only the name of files containing pattern<br \/>\n# grep \u2013f pattern.lst emp.lst\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Taking patterns from files<\/p>\n<p><strong>Grep a file, but show several surrounding lines?<\/strong><\/p>\n<p>For BSD or GNU grep you can use -B num to set how many lines before the match and -A num for th number of lines after the match.<br \/>\ngrep -B 3 -A 2 foo README.txt<\/p>\n<p>If you want the same amount of lines before and after you can use -C num.<br \/>\ngrep -C 3 foo README.txt<br \/>\nThis will show 3 lines before and 3 lines after.<\/p>\n<p><strong>Basic Regular Expression tables<\/strong><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>Symbols or Expressions<\/strong><\/td>\n<td valign=\"top\" width=\"480\"><strong>Matches<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>*<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Zero or more occurrances of the previous character<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>g*<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Nothing or g,gg,ggg, etc<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>.<\/strong><\/td>\n<td valign=\"top\" width=\"480\">A Single Character<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>.*<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Nothing or any number of character<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>[pqr]<\/strong><\/td>\n<td valign=\"top\" width=\"480\">A single character p, q or r<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>[c1-c2]<\/strong><\/td>\n<td valign=\"top\" width=\"480\">A Single Character with ASCII range<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>[1-3]<\/strong><\/td>\n<td valign=\"top\" width=\"480\">A single digit between 1 and 3<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>[^pqr]<\/strong><\/td>\n<td valign=\"top\" width=\"480\">A Single character which is not a p,q or r<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>[^a-zA-Z]<\/strong><\/td>\n<td valign=\"top\" width=\"480\">A non-alphabetic character<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>^pat<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Pattern pat at the beginning of the line<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>pat$<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Pattern pat at the end of the line<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>bash$<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Bash at the end of the line<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>^bash$<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Bash as the only one word in line<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>^$<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Line containing nothing<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>+<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Matches one or more character of previous character<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>?<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Matches zero or one occurrence of the previous character<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>|<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Delimiter for multiple pattern<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"158\"><strong>( )<\/strong><\/td>\n<td valign=\"top\" width=\"480\">Group pattern<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Example:<\/strong><br \/>\n# grep \u201c[aA]g[ar][ar]wal filename<br \/>\n# grep \u201c[aA]gg*[ar][ar]wal\u201d filename<br \/>\n# grep \u201cj.*Saxena\u201d filename<br \/>\n# grep \u201c^2\u201d filename<br \/>\n# grep \u201c7\u2026$\u201d filename<br \/>\n# grep \u201c^[^2]\u201d filename<br \/>\n# grep \u2013E \u201c[aA]gg?arwal\u201d filename<br \/>\n# grep \u2013E \u2018sengupta|dasgupta\u2019 filename<br \/>\n# grep \u2013E \u2018(sen|das)gupta\u2019 filename<\/p>\n<p><strong>Editor<\/strong><br \/>\nAwk\u00a0 &#8211; http:\/\/www.thegeekstuff.com\/2010\/01\/awk-introduction-tutorial-7-awk-print-examples\/<br \/>\nSed<br \/>\nvi<\/p>\n<p># sed \u2013 The Stream Editor<br \/>\n# sed \u20183q\u2019 filename == head \u2013n 3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Quit after line number 3<br \/>\n# sed \u2013n \u20181,2p\u2019 filename\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Prints the first 2 lines. Must use \u2013n with p<br \/>\n# sed \u2013n \u2018$p\u2019 filename\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 print last line<br \/>\n# sed \u2013n \u20189,11p 7,9p $p\u2019 filename<br \/>\n# sed \u2013n \u20183,$ip\u2019 filename\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Don\u2019t print line 3 to the end, display only line 1 and 2<\/p>\n<p># sed \u2013n \u2018\/director\/p\u2019 filename\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 To print the lines which has pattern in filename<br \/>\n# sed \u2013n \u2018\/dasgupta\/,\/saksena\/p\u2019 filename<br \/>\n# sed \u2013n \u20181,\/dasgupta\/p\u2019 filename<br \/>\n# sed \u2013n \u2018\/[aA]gg*[ar][ar]wal\/p\u2019 filename<br \/>\n# sed \u2013n \u2018\/sa[kx]s*ena\/p \/Gupta\/p\u2019 filename<br \/>\n# sed \u2013n \u2018\/50\u2026..$\/p\u2019 filename<\/p>\n<p># sed \u2013n \u2018director\/w\u00a0 dlsit\u2019 filename<br \/>\n# sed \u2013n \u2018director\/w dlist \/manager\/w mlist \/executive\/w elist\u2019 filename<br \/>\n# sed \u2013n \u20181,500w foo1 501,$w foo2\u2019 filename<\/p>\n<p># sed \u20181i\\<br \/>\n&gt; #include &lt;stdio.h&gt;\\<br \/>\n&gt; #include&lt;unistd.h&gt;<br \/>\n&gt;\u2019 foo.c\u00a0 &gt;&gt; $$\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Include these include on beginning of the program<br \/>\n# sed \u2018a\\<\/p>\n<p>\u2018 filename\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # insert after every line this blank line<br \/>\n# sed \u201c\/director\/d\u2019 filename &gt; filename2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 -n option not to be used with d<br \/>\n== # grep \u2013v \u201cdirector\u201d filename &gt; filename2<br \/>\n# sed \u2013n \u2018\/director\/!p\u2019 filename1 &gt; filename2<\/p>\n<p># sed \u2018s\/|\/:\/\u2019 filename | head -2<br \/>\n# sed \u2018s\/|\/:\/g\u2019 filename | head -2<br \/>\n# sed \u20181,3s\/|\/:\/g\u2019 filename<br \/>\n# sed \u20181,5s\/director\/member \/\u2019 filename<br \/>\n# sed \u2018s\/^\/2\u2019 filename<br \/>\n# sed \u2018s\/$.00\/\u2019 filename<\/p>\n<p><strong>Sed tables<\/strong><\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"130\">Command<\/td>\n<td valign=\"top\" width=\"508\">Description<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"130\">I,a,c<\/td>\n<td valign=\"top\" width=\"508\"><strong>Insert, Appends and Changes text<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"130\">d<\/td>\n<td valign=\"top\" width=\"508\"><strong>Delete lines<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"130\">10q<\/td>\n<td valign=\"top\" width=\"508\"><strong>Quit after reading the first 10 lines<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"130\">p<\/td>\n<td valign=\"top\" width=\"508\"><strong>Print line on standard outputs<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"130\">3,$p<\/td>\n<td valign=\"top\" width=\"508\"><strong>Print lines 3 to the end. \u2013n option is required<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"130\">$!p<\/td>\n<td valign=\"top\" width=\"508\"><strong>Prints all lines except last line. \u2013n option required<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"130\">\/begin\/,\/end\/p<\/td>\n<td valign=\"top\" width=\"508\"><strong>Print lines enclosed between begin and end. \u2013n option required<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"130\">q<\/td>\n<td valign=\"top\" width=\"508\"><strong>Quit after reading uo to the address line<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"130\"><\/td>\n<td valign=\"top\" width=\"508\"><strong>\u00a0<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Vi &#8211; Editor\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/strong><\/p>\n<p><strong>IMPORTANT \u2013 YOU SHOULD USE DOUBLE QUOTES ONLY WHEN PARAMETER EVALULATION OR command substitution is embedded within command<\/strong><\/p>\n<p>Write about command \u201cw\u201d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>General Commands Not Used Frequently cal \u2013 The Calender bc \u2013 The Calculator file \u2013 knowing the file types cmp [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":3671,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[54],"tags":[378,1122,460,1994,2007,2006,2005,2004,2000,2002,2001,2008,2009,938,104,412,2010],"class_list":["post-359","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unix-linux","tag-commands","tag-guide","tag-linux","tag-linux-commands","tag-linux-commands-for-user-guide","tag-linux-commands-for-user-reference","tag-linux-commands-for-user-tutorials","tag-linux-commands-for-users","tag-linux-commands-guide","tag-linux-commands-reference","tag-linux-commands-tutorials","tag-linux-user-commands-guide","tag-linux-user-commands-tutorials","tag-reference","tag-tutorials","tag-user","tag-users-linux-commands"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Linux Commands for User | Linux User Commands Reference - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux Commands for User | Linux User Commands Reference - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"General Commands Not Used Frequently cal \u2013 The Calender bc \u2013 The Calculator file \u2013 knowing the file types cmp [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-21T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:52:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-user.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"Linux Commands for User | Linux User Commands Reference\",\"datePublished\":\"2014-07-21T00:00:00+00:00\",\"dateModified\":\"2021-02-27T09:52:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/\"},\"wordCount\":3201,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/linux-commands-user.png\",\"keywords\":[\"commands\",\"Guide\",\"Linux\",\"Linux Commands\",\"Linux Commands for User Guide\",\"Linux Commands for User Reference\",\"Linux Commands for User Tutorials\",\"Linux Commands for Users\",\"Linux Commands Guide\",\"Linux Commands Reference\",\"Linux Commands Tutorials\",\"Linux User Commands Guide\",\"Linux User Commands Tutorials\",\"Reference\",\"Tutorials\",\"user\",\"Users Linux Commands\"],\"articleSection\":[\"Unix - Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/\",\"name\":\"Linux Commands for User | Linux User Commands Reference - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/linux-commands-user.png\",\"datePublished\":\"2014-07-21T00:00:00+00:00\",\"dateModified\":\"2021-02-27T09:52:13+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/linux-commands-user.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/linux-commands-user.png\",\"width\":600,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/linux-commands-for-user\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux Commands for User | Linux User Commands Reference\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux Commands for User | Linux User Commands Reference - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/","og_locale":"en_US","og_type":"article","og_title":"Linux Commands for User | Linux User Commands Reference - scmGalaxy","og_description":"General Commands Not Used Frequently cal \u2013 The Calender bc \u2013 The Calculator file \u2013 knowing the file types cmp [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/","og_site_name":"scmGalaxy","article_published_time":"2014-07-21T00:00:00+00:00","article_modified_time":"2021-02-27T09:52:13+00:00","og_image":[{"width":600,"height":400,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-user.png","type":"image\/png"}],"author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"Linux Commands for User | Linux User Commands Reference","datePublished":"2014-07-21T00:00:00+00:00","dateModified":"2021-02-27T09:52:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/"},"wordCount":3201,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-user.png","keywords":["commands","Guide","Linux","Linux Commands","Linux Commands for User Guide","Linux Commands for User Reference","Linux Commands for User Tutorials","Linux Commands for Users","Linux Commands Guide","Linux Commands Reference","Linux Commands Tutorials","Linux User Commands Guide","Linux User Commands Tutorials","Reference","Tutorials","user","Users Linux Commands"],"articleSection":["Unix - Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/","name":"Linux Commands for User | Linux User Commands Reference - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-user.png","datePublished":"2014-07-21T00:00:00+00:00","dateModified":"2021-02-27T09:52:13+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-user.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2014\/07\/linux-commands-user.png","width":600,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/linux-commands-for-user\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Linux Commands for User | Linux User Commands Reference"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=359"}],"version-history":[{"count":2,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/359\/revisions"}],"predecessor-version":[{"id":3672,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/359\/revisions\/3672"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/3671"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}