HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Atomic shell-level commands
Operating System - HP-UX
1834287
Members
2002
Online
110066
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2004 04:49 PM
08-18-2004 04:49 PM
Atomic shell-level commands
It's my understanding that the action of mkdir(1) is about as close as one can get to a mutex at shell level. Then I also heard that the ln -s (i.e. create a symlink) had this property also.
(a) Is this the case?
(b) If ln -s is (more or less) atomic, then so too is the action of ln by itself (i.e. creation of a hard link)?
tks
(a) Is this the case?
(b) If ln -s is (more or less) atomic, then so too is the action of ln by itself (i.e. creation of a hard link)?
tks
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2004 05:51 PM
08-18-2004 05:51 PM
Re: Atomic shell-level commands
Depends upon the directory permission/ owner ship/ groups directories ( files) can be given permission to access.
how are u specifying mutex over there in mkdir / ln commands?
ln -s will create a softlink to another directory / files without having full contents. It can not be used over NFS
if the file is not in the mounted / exported limits
hard link will contains the contents and link to the file.
hard links vs soft links
Master1 # cat > /tmp/test1.ls
hai
bye
Master1 # ln -s /tmp/test1.ls /tmp/test2.ls
Master1 # ll /tmp/test?.ls
-rw-rw-rw- 1 root sys 8 Aug 19 11:14 /tmp/test1.ls
lrwxrwxrwx 1 root sys 13 Aug 19 11:15 /tmp/test2.ls -> /tmp/test1.ls
Master1 # cat /tmp/test2.ls
hai
bye
Master1 # ln -f /tmp/test1.ls /tmp/test3.ls
Master1 # cat /tmp/test3.ls
hai
bye
Master1 # mv /tmp/test1.ls /tmp/test4.ls
Master1 # cat /tmp/test2.ls
cat: Cannot open /tmp/test2.ls: No such file or directory
Master1 # cat /tmp/test3.ls
hai
bye
how are u specifying mutex over there in mkdir / ln commands?
ln -s will create a softlink to another directory / files without having full contents. It can not be used over NFS
if the file is not in the mounted / exported limits
hard link will contains the contents and link to the file.
hard links vs soft links
Master1 # cat > /tmp/test1.ls
hai
bye
Master1 # ln -s /tmp/test1.ls /tmp/test2.ls
Master1 # ll /tmp/test?.ls
-rw-rw-rw- 1 root sys 8 Aug 19 11:14 /tmp/test1.ls
lrwxrwxrwx 1 root sys 13 Aug 19 11:15 /tmp/test2.ls -> /tmp/test1.ls
Master1 # cat /tmp/test2.ls
hai
bye
Master1 # ln -f /tmp/test1.ls /tmp/test3.ls
Master1 # cat /tmp/test3.ls
hai
bye
Master1 # mv /tmp/test1.ls /tmp/test4.ls
Master1 # cat /tmp/test2.ls
cat: Cannot open /tmp/test2.ls: No such file or directory
Master1 # cat /tmp/test3.ls
hai
bye
Easy to suggest when don't know about the problem!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP