HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Creating ttyp2 with mknod problem
Operating System - HP-UX
1838667
Members
6137
Online
110128
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
Go to solution
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
03-28-2006 01:33 AM
03-28-2006 01:33 AM
I am trying to recreate the character file /dev/ttyp2. The other files look like this:
crw-rw-rw- 2 bin tty 17 0x000000 Dec 21 13:56 ttyp0
crw-rw-rw- 2 root root 17 0x000001 Mar 27 11:05 ttyp1
I create this one:
crw-rw-rw- 1 root sys 17 0x000002 Mar 28 09:26 ttyp2
I used this command:
mknod ttyp2 c 17 0x000002
My question, what does the "1" in the second column refer to for device files and why do the other device files have a "2" there.
And mostly, how can I create /dev/ttyp2 so that its like the rest?
Thanks in advance.
crw-rw-rw- 2 bin tty 17 0x000000 Dec 21 13:56 ttyp0
crw-rw-rw- 2 root root 17 0x000001 Mar 27 11:05 ttyp1
I create this one:
crw-rw-rw- 1 root sys 17 0x000002 Mar 28 09:26 ttyp2
I used this command:
mknod ttyp2 c 17 0x000002
My question, what does the "1" in the second column refer to for device files and why do the other device files have a "2" there.
And mostly, how can I create /dev/ttyp2 so that its like the rest?
Thanks in advance.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2006 01:39 AM
03-28-2006 01:39 AM
Re: Creating ttyp2 with mknod problem
dear jason,
it is the present links of the files only .the previous having one more link file also.the latter one has no more link file.you can use ln -s sourcefile destination file
regards
Baiju
it is the present links of the files only .the previous having one more link file also.the latter one has no more link file.you can use ln -s sourcefile destination file
regards
Baiju
nothing is impossible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2006 01:42 AM
03-28-2006 01:42 AM
Solution
Hi Jason:
The "1" in the second field of an 'ls' is the number of links to a file. The manpages for 'ls' provide you that.
To see the inode number of a file, do:
# ls -il filename
Once you have an inode number, you can find the hard-linked files with:
# find -xdev -inum nnn
NOTE that an inode number is only unique within a mountpoint, so its very important to use '-xdev' with 'find' so not to cross mountpoints.
Regards!
...JRF...
The "1" in the second field of an 'ls' is the number of links to a file. The manpages for 'ls' provide you that.
To see the inode number of a file, do:
# ls -il filename
Once you have an inode number, you can find the hard-linked files with:
# find
NOTE that an inode number is only unique within a mountpoint, so its very important to use '-xdev' with 'find' so not to cross mountpoints.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2006 01:56 AM
03-28-2006 01:56 AM
Re: Creating ttyp2 with mknod problem
Thanks James. That was what I needed to find. Just need to do a hard link of /dev/pty/ttyp2 to the new device file /dev/ttyp2 that I created.
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