<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Regarding unix commands in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997900#M777908</link>
    <description>When i do a ls -l acego i am getting the below output&lt;BR /&gt;-r-xr-xr-x   2 scc        scc        1286492 Aug 12  12:48 acego&lt;BR /&gt;&lt;BR /&gt;1. I am able to see acego has 2 links. I don't know whether it's a soft or hard link. How do i find the link  which is pointing for acego.&lt;BR /&gt;&lt;BR /&gt;2.  I am unable to see the year value in the listing. Only "Aug 12  12:48" i am able to see. How do i find the year in which the file is created.&lt;BR /&gt;&lt;BR /&gt;3. I tried to create a directory and delete a directory from a different directory location but i am getting an error&lt;BR /&gt;mkdir $HOME/test1&lt;BR /&gt;rmdir $HOME/test1&lt;BR /&gt;rmdir: /home/users/fcc/test1: Cannot remove mountable directory&lt;BR /&gt;&lt;BR /&gt;4. ls -ltr Back*  &lt;BR /&gt;-rw-r--r--   1 fcc        fcc           1692 Aug 17 05:27 Backout.sh&lt;BR /&gt;&lt;BR /&gt;I want to write a shell script in which i want to check the permission of Backout.sh is 644 and owner is fcc and group is fcc.   I tried this one&lt;BR /&gt;ls -ltr Backout.sh | grep scc &amp;gt;&amp;gt; /tmp/backouterr.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 17 Aug 2006 06:46:57 GMT</pubDate>
    <dc:creator>vind123</dc:creator>
    <dc:date>2006-08-17T06:46:57Z</dc:date>
    <item>
      <title>Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997900#M777908</link>
      <description>When i do a ls -l acego i am getting the below output&lt;BR /&gt;-r-xr-xr-x   2 scc        scc        1286492 Aug 12  12:48 acego&lt;BR /&gt;&lt;BR /&gt;1. I am able to see acego has 2 links. I don't know whether it's a soft or hard link. How do i find the link  which is pointing for acego.&lt;BR /&gt;&lt;BR /&gt;2.  I am unable to see the year value in the listing. Only "Aug 12  12:48" i am able to see. How do i find the year in which the file is created.&lt;BR /&gt;&lt;BR /&gt;3. I tried to create a directory and delete a directory from a different directory location but i am getting an error&lt;BR /&gt;mkdir $HOME/test1&lt;BR /&gt;rmdir $HOME/test1&lt;BR /&gt;rmdir: /home/users/fcc/test1: Cannot remove mountable directory&lt;BR /&gt;&lt;BR /&gt;4. ls -ltr Back*  &lt;BR /&gt;-rw-r--r--   1 fcc        fcc           1692 Aug 17 05:27 Backout.sh&lt;BR /&gt;&lt;BR /&gt;I want to write a shell script in which i want to check the permission of Backout.sh is 644 and owner is fcc and group is fcc.   I tried this one&lt;BR /&gt;ls -ltr Backout.sh | grep scc &amp;gt;&amp;gt; /tmp/backouterr.log&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Aug 2006 06:46:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997900#M777908</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-08-17T06:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997901#M777909</link>
      <description>2. If you don't see the year, then it's the current year in the system.&lt;BR /&gt;&lt;BR /&gt;3. will depend on that's the o/p of $HOME/test1</description>
      <pubDate>Thu, 17 Aug 2006 06:52:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997901#M777909</guid>
      <dc:creator>Pupil_1</dc:creator>
      <dc:date>2006-08-17T06:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997902#M777910</link>
      <description>1. soft link is indicated by "l" letter</description>
      <pubDate>Thu, 17 Aug 2006 06:54:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997902#M777910</guid>
      <dc:creator>Yarek</dc:creator>
      <dc:date>2006-08-17T06:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997903#M777911</link>
      <description>2. if there is no year value, it means it's current year</description>
      <pubDate>Thu, 17 Aug 2006 06:58:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997903#M777911</guid>
      <dc:creator>Yarek</dc:creator>
      <dc:date>2006-08-17T06:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997904#M777912</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;1. ll &lt;LINKNAME&gt; if it spans filesystems its definitely a soft link.&lt;BR /&gt;2. If it doesn't show a year, its this year. ie less than a year old.&lt;BR /&gt;3. You are in an nfs home directory and trying to remove things you don't have permission for. This may be due to NFS configuration.&lt;BR /&gt;&lt;BR /&gt;PERM-$(ll Backout.sh | awk '{print $1}')&lt;BR /&gt;OWNER-$(ll Backout.sh | awk '{print $2}')&lt;BR /&gt;GROUP-$(ll Backout.sh | awk '{print $3}')&lt;BR /&gt;&lt;BR /&gt;Make and if statement to let you know when you are not happy with the results from these commands.&lt;BR /&gt;&lt;BR /&gt;ll can be replaced with ls -la with no impact.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;&lt;/LINKNAME&gt;</description>
      <pubDate>Thu, 17 Aug 2006 07:00:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997904#M777912</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-08-17T07:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997905#M777913</link>
      <description>4.&lt;BR /&gt;&lt;BR /&gt;permission=`ll Backout.sh | awk '{print $1}'`&lt;BR /&gt;&lt;BR /&gt;if [ $permission = "-rw-r--r--" ]&lt;BR /&gt;then&lt;BR /&gt; echo "mask of permission is 644"&lt;BR /&gt;else&lt;BR /&gt; echo "Wrong permission"&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Thu, 17 Aug 2006 07:10:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997905#M777913</guid>
      <dc:creator>Yarek</dc:creator>
      <dc:date>2006-08-17T07:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997906#M777914</link>
      <description>1. The first character of the permissions list is the file type - in this case, - means that this is an ordinary file. A softlink will start with the letter l. The number 2 indicates that there are 2 inodes pointing to the same file, which is what defines a hard link. A hard link is simple another name for the same file in the same filesystem (mountpoint). A softlink has no limits on what it can point to.&lt;BR /&gt; &lt;BR /&gt;2. As mentioned, the ll command changes format to include the year when the file is more than 6 months old. Use the command: man ll&lt;BR /&gt; &lt;BR /&gt;3. The $HOME directory is probably an NFRS mountpoint and you do not have permission to change that directory. To see if $HOME is an NFS mountpoint, bdf $HOME&lt;BR /&gt; &lt;BR /&gt;4. I'm not sure how your request to check permissions and ownership relates to the example you gave. Converting the symbolic permissions (-rw-r--r--) to a number requires a lot of scripting code but comparing the permission string in its symbolic form is easy. You can extract the 1st, 3rd and 4th fields from ll like this:&lt;BR /&gt; &lt;BR /&gt;ls -ldtr Back* | while read PERM LINK OWN GRP RESTOFLINE&lt;BR /&gt;do&lt;BR /&gt;echo "perm= $PERM, owner= $OWN group= $GRP $RESTOFLINE"&lt;BR /&gt;done&lt;BR /&gt; &lt;BR /&gt;Note the use of -d in the ls command. In case the ls command finds a directory, the -d keeps the listing to jsut the directory and not the contents.</description>
      <pubDate>Thu, 17 Aug 2006 07:18:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997906#M777914</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-08-17T07:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997907#M777915</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;1.  Since you have a link count that is greater than one (1) this is a hard-link.  Too, soft (symbolic) links will have an "l" (the letter) as the first character of the first field returned by a 'ls' listing.  See the manpages for 'ls(1)'.&lt;BR /&gt;&lt;BR /&gt;2.  The output of 'ls' shows the month, day, hour and minute of timestamps *unless* the file is 6-months or more old.  In that case, the hours and minutes are replaced with the four-digit year value.  Thus, any file timestamp showing hours and minutes belongs to the current calendar year.&lt;BR /&gt;&lt;BR /&gt;Unix does *not* maintain any creation timestamp.  The default output for 'ls' is the *modification* time or 'mtime'.  When a file is first created, the 'mtime' is equal to the creation time, but thereafter any modifications are tracked using the single timestamp.  Read the manpages for 'stat(2)' to understand the three timestamps associated with files.&lt;BR /&gt;&lt;BR /&gt;3.  The message "cannot remove mountable directory" means that you have 'cd'ed into the directory that you are trying to remove.  You cannot remove a directory into which you have changed.  This would be like standing on a ladder and kicking it out from underneath yourself!&lt;BR /&gt;&lt;BR /&gt;4.  You can use 'ls filename' and 'cut' or 'awk' to extact the permissions (mode) field along with the owner to compare for what you want.  For instance:&lt;BR /&gt;&lt;BR /&gt;# MODES=`ls -l /tmp/me|cut -d" " -f1`;echo ${MODES}&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 17 Aug 2006 07:27:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997907#M777915</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-08-17T07:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997908#M777916</link>
      <description>To find the other hard link to file acego:&lt;BR /&gt;&lt;BR /&gt;ls -li acego (inode will be the first field)&lt;BR /&gt;find &lt;ROOT of="" file="" system=""&gt; -inum &lt;INODE number="" from="" above=""&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/INODE&gt;&lt;/ROOT&gt;</description>
      <pubDate>Thu, 17 Aug 2006 08:59:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997908#M777916</guid>
      <dc:creator>Tom Danzig</dc:creator>
      <dc:date>2006-08-17T08:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997909#M777917</link>
      <description>Thanks a lot for the info. I will try these and will come back .Also i forgot to add one more question to my post.&lt;BR /&gt;&lt;BR /&gt;drwxrwxrwt   2 fcc        fcc           1024 Aug 16 23:20 cdd &lt;BR /&gt;&lt;BR /&gt;what this final t in the permission stands for and what is it purpose. I want to create a new directory and set the same permission as of cdd. what permission in the chmod command  i need to give for this one.</description>
      <pubDate>Fri, 18 Aug 2006 02:44:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997909#M777917</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-08-18T02:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997910#M777918</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You asked what the significance of the "t" is in "drwxrwxrwt".&lt;BR /&gt;&lt;BR /&gt;The "t" indicates that the "sticky bit" is set.  If the sticky bit is set for a directory, then the directory's files can only be renamed or removed by the owner of the file, the owner of the directory, or by root.&lt;BR /&gt;&lt;BR /&gt;If the sticky bit is set for an executable file, then the text (code) of the executable remains in memory for subsequent executions. This may make process startup for the executable faster.&lt;BR /&gt;&lt;BR /&gt;In the case of your directory, you would have obtained these modes with:&lt;BR /&gt;&lt;BR /&gt;# chmod 1777 cdd&lt;BR /&gt;&lt;BR /&gt;See the manpages for 'chmod(1)' for more information.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 18 Aug 2006 05:20:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997910#M777918</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-08-18T05:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding unix commands</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997911#M777919</link>
      <description>Thanks a lot for the info</description>
      <pubDate>Thu, 07 Sep 2006 02:03:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/regarding-unix-commands/m-p/4997911#M777919</guid>
      <dc:creator>vind123</dc:creator>
      <dc:date>2006-09-07T02:03:51Z</dc:date>
    </item>
  </channel>
</rss>

