Strange slash in process


 
Thread Tools Search this Thread
Operating Systems Solaris Strange slash in process
# 1  
Old 01-04-2013
Strange slash in process

I have Solaris-9, where ndsd application is running. If i grep it, it should three slashed in front of path. Thought everything is working working, but it looks strange, why it is like this.
HTML Code:
root@trim_prt7:/# ps -ef | grep -i ndsd
    root 21505 21355  0 08:58:20 pts/23   0:00 grep -i ndsd
    root 16238     1  1 08:26:23 ?       30:01 ///opt/novell/eDirectory/sbin/ndsd
root@trim_prt7:/# ls -l /opt/novell/eDirectory/sbin/ndsd
-rwxr-xr-x   1 root     bin       514076 May 25  2006 /opt/novell/eDirectory/sbin/ndsd
# 2  
Old 01-04-2013
It breaks nothing. The command that started the process had /// typed in. File matching in POSIX shells ignores extra leading '/' characters

Code:
parg 16238

will show you what the parameters were.
This User Gave Thanks to jim mcnamara For This Post:
# 3  
Old 01-04-2013
Thanks Jim,
Code:
root@trim_prt7:/# pargs 16238
16238:  ///opt/novell/eDirectory/sbin/ndsd
argv[0]: ///opt/novell/eDirectory/sbin/ndsd

Here it is.
But I do not see continuous three slashes in its startup script.
Code:
cat /etc/init.d/ndsd | grep "///"

This returns nothing.

Last edited by solaris_1977; 01-04-2013 at 01:22 PM..
# 4  
Old 01-04-2013
Quote:
Originally Posted by solaris_1977
I have Solaris-9, where ndsd application is running. If i grep it, it should three slashed in front of path. Thought everything is working working, but it looks strange, why it is like this.
HTML Code:
root@trim_prt7:/# ps -ef | grep -i ndsd
    root 21505 21355  0 08:58:20 pts/23   0:00 grep -i ndsd
    root 16238     1  1 08:26:23 ?       30:01 ///opt/novell/eDirectory/sbin/ndsd
root@trim_prt7:/# ls -l /opt/novell/eDirectory/sbin/ndsd
-rwxr-xr-x   1 root     bin       514076 May 25  2006 /opt/novell/eDirectory/sbin/ndsd
On Solaris, any number of leading slash characters will resolve to the same path as if there is just one leading slash (unless the extra characters make the path longer than PATH_MAX).

Some applications insert two extra slashes at the start of a pathname to simplify internal logic when combining various pathname components into a complete pathname. The standards allow a pathname that starts with exactly two leading slashes to be treated specially. (Some implementations treat two leading slashes as a reference to a super-root such that //node/pathname resolves to the file with the absolute pathname specified by /pathname on the machine on the local network with nodename node.) Therefore, portable applications should be sure that they never create a pathname for a local file that starts with two slashes.

In case some people reading this thread didn't know, you usually see a single slash between directories in a pathname, but (again, other than string length requirements) the pathnames a/b, a//b, a///b, and, in fact, a followed by any positive number of / characters followed by b all are required to resolve to the same file.

When an application is given a directory name and a filename and combines them into a pathname by concatenating a directory name, a slash, and a filename to produce a pathname, the application won't get the right file if the directory given is the root directory (/) and it is running on a system that supports the super-root extension. But, if it combines them into a pathname by concatenating the directory name, two slash characters, and the filename; it will always work as expected (since if the root directory is the given directory, the combined pathname will start with /// instead of //).
This User Gave Thanks to Don Cragun For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX: two strange process

I check for top 10 cpu consumer ps auxww |head -10 USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND root 131076 23,6 0,0 448 448 - A 16:00:59 50:21 wait root 983070 21,9 0,0 448 448 - A 16:00:59 46:43 waitI try to kill them sudo... (0 Replies)
Discussion started by: Linusolaradm1
0 Replies

2. Shell Programming and Scripting

Need to remove slash

I got stuck in problem i need to remove slash but it is not working. current output /usr/sbin/httpd expected output usr sbin httpd (4 Replies)
Discussion started by: learnbash
4 Replies

3. Shell Programming and Scripting

Slash delimiter

I have a log file which on field $11 there is sth like: /A/B/C and I want to extract the last part which is C. for space delimiter I used: awk '{print $2 " " $5 ";" $7 ";" $9 ";" $11}' and had no problem. but dont know how to extract the 3rd part of the slash delimiter. That would be... (6 Replies)
Discussion started by: frhling
6 Replies

4. Cybersecurity

Strange Process FIST

Just run top on my server and noticed lots of processes called "fist" 28626 root 15 0 18176 12m 2420 S 2.7 0.2 0:00.08 fist 28631 root 15 0 18176 12m 2420 S 2.7 0.2 0:00.08 fist 28633 root 15 0 18172 12m 2420 S 2.7 0.2 0:00.08 fist 28640 root 15 0... (1 Reply)
Discussion started by: m50ell
1 Replies

5. UNIX for Dummies Questions & Answers

Replace slash / with space

Hello there everyone. would like to ask for help if i wish to replace a slash / with space using sed. Original: T/T Result: T T hope someone could help me up, thanks Charles (4 Replies)
Discussion started by: seiksoon
4 Replies

6. Shell Programming and Scripting

Using sed to append backward slash before forward slash

Hi all, I need to know way of inserting backward slash before forward slash. My problem is that i need to supply directory path as an argument while invoking cshell script. This argument is further used in script (i.e. sed is used to insert this path in some file). So i need to place \ in front... (2 Replies)
Discussion started by: sarbjit
2 Replies

7. UNIX for Advanced & Expert Users

Substitute single backward-slash with the double backward-slash

Hi, I have a path like this c:\test\sample\programs, i need to change thiis to c:\\test\\sample\\programs. How to perform this? I tried tr command but it didn't help me. Thanks Vijayan (3 Replies)
Discussion started by: mvictorvijayan
3 Replies

8. Shell Programming and Scripting

About \ (Back slash)

Hi All, print "path/executable_file parameters" \ > path/file1 print "path/executable_file parameters" \ > path/file2 print "path/executable_file parameters" \ > path/file3 chmod 775 path/file1 \ path/file2 \ ... (7 Replies)
Discussion started by: Arunprasad
7 Replies

9. Shell Programming and Scripting

Replace the last slash alone

Hi All, Can you please help me with the below issue. I want only the last slash to be replaced with space. 06/05/2008/EDED_FD_BDCD_ABCD_123 06/05/2008 EDED_FD_BDCD_ABCD_123 (3 Replies)
Discussion started by: christineida
3 Replies

10. Shell Programming and Scripting

awk slash

I have configuration file(master.cnf), that contents are: VER1LOG /src/ver1/log VER2LOG /src/ver2/log APPLOG /src/sys/apps/log APPCONF /src/sys/apps/conf APPBIN /src/sys/apps/bin my shell script is as below mylog=sys/apps awk "/$mylog/" master.cnf awk: syntax error Context is: >>> ... (6 Replies)
Discussion started by: McLan
6 Replies
Login or Register to Ask a Question