Sponsored Content
Top Forums UNIX for Beginners Questions & Answers What is the difference ../directory path and ./directory path in ksh? Post 303043206 by Scrutinizer on Tuesday 21st of January 2020 11:15:35 AM
Old 01-21-2020
Hi,

.. refers to the parent directory
. refers to the current directory
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Determining directory path

Hello, I have a script where I get the full directory path of the script being executed: BASE=$0 echo "BASE:" $BASE The output looks like this: BASE: /webapps/appsdev/ACURA/rlz/oses3.sh I'd like to truncate the shell name, leaving just the directory path. The directory path can be... (2 Replies)
Discussion started by: cwalsek
2 Replies

2. UNIX for Dummies Questions & Answers

ksh - walking back up a directory PATH

Hi there, I am putting a script together to apply a label to a directory structure but it can't be done down the directory structure, i must start at the end and work back and this is what i am struggling with. for example, i will supply a path as an argument to a script, e.g ... (11 Replies)
Discussion started by: surfbus78
11 Replies

3. UNIX for Dummies Questions & Answers

How to get directory name from its path?

If I the path to a directory, what command can I use to return the actual name of that directory. test=`pwd`/folder1 > $test folder1 I'd rather avoid anything with regular expressions. Any ideas? (1 Reply)
Discussion started by: ordano
1 Replies

4. HP-UX

change directory path

Hi, when ever i login my unix system it is going to root directory....how can i change it specified directory.. (3 Replies)
Discussion started by: rsivasan
3 Replies

5. Shell Programming and Scripting

Retrieve directory path from full file path through sh

Hi, I have a file abcd.txt which has contents in the form of full path file names i.e. $home> vi abcd.txt /a/b/c/r1.txt /q/w/e/r2.txt /z/x/c/r3.txt Now I want to retrieve only the directory path name for each row i.e /a/b/c/ /q/w/e/ How to get the same through shell script?... (7 Replies)
Discussion started by: royzlife
7 Replies

6. Shell Programming and Scripting

"find . -printf" without prepended "." path? Getting path to current working directory?

If I enter (simplified): find . -printf "%p\n" then all files in the output are prepended by a "." like ./local/share/test23.log How can achieve that a.) the leading "./" is omitted and/or b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Discussion started by: pstein
1 Replies

7. Shell Programming and Scripting

How to get last directory path in script

I have a below directory name /root/logs/testing/today/ Here i have get to the value as '/root/logs/testing/' only without the last directory in a shell script. Do i need to use substr function here. Is there any other way around (6 Replies)
Discussion started by: vel4ever
6 Replies

8. Shell Programming and Scripting

Keep last directory from path

Hello, I am looking for a command that will give me the last directory name from a path ex 1 : /dir1/dir/2/dir3/ output needed dir3 ex 2 : /dir1/dir/2/dir3/dir4/ output needed dir4 (1 Reply)
Discussion started by: Aswex
1 Replies

9. UNIX for Dummies Questions & Answers

Extract directory name from the full directory path in UNIX using shell scripting

My input is as below : /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt /splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt /splunk/scrubbed/triumph/ifind.triumph.txt From the above input I want to extract the file names only . Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies

10. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
NIUTIL(1)						      General Commands Manual							 NIUTIL(1)

NAME
niutil - NetInfo utility SYNOPSIS
niutil -create [ opts ] domain path niutil -destroy [ opts ] domain path niutil -createprop [ opts ] domain path key [ val... ] niutil -appendprop [ opts ] domain path key val... niutil -mergeprop [ opts ] domain path key val... niutil -insertval [ opts ] domain path key val index niutil -destroyprop [ opts ] domain path key niutil -destroyval [ opts ] domain path key val niutil -renameprop [ opts ] domain path oldkey newkey niutil -read [ opts ] domain path niutil -list [ opts ] domain path niutil -rparent [ opts ] domain niutil -resync [ opts ] domain niutil -statistics [ opts ] domain DESCRIPTION
niutil lets you to do arbitrary reads and writes on the given NetInfo domain. In order to perform writes, niutil must be run as root on the NetInfo master for the database, unless the -p, -P, or -u options are given. The directory specified by path is separated by "/"s, similar to the filesystem. The property names may be given in the path using a "=", but will default to the property name "name". For example, the following refers to a user with the user ID 3. "/name=users/uid=3" The following shorter form would also be sufficient: "/users/uid=3" You may specify a numeric ID for the directory instead of the string path. OPTIONS
-t Interpret the domain as a tagged domain. For example, "parrish/network" refers to the database tagged "network" on the machine "parrish". You may supply an IP address instead of a machine name. -p Prompt for the root password or the named user password if combined with the -u option. -u user Run this command as the named user. This option implies -p. -P password Supplies the root password or the named user password if combined with the -u option. -T seconds Sets the read and write timeout to the given number of seconds. OPERATIONS
-create domain path Create a new directory with the given path. -destroy domain path Destroy the directory with the given path. -createprop domain path key [ val... ] Create a new property in the directory path. key refers to the name of the property; 0 or more property values may be specified. If the named property already exists, it's overwritten. -appendprop domain path key val... Appends new values to an existing property in the directory path. key refers to the name of the property; 0 or more property values may be specified. If the named property doesn't exist, it's created. -mergeprop domain path key val... Merges new values into an existing property in the directory path. key refers to the name of the property; 0 or more property val- ues may be specified. The values are appended to the property only if they are not already present. If the named property doesn't exist, it's created. -insertval domain path key val propindex Inserts a new value into an existing property in the directory path at position propindex. key refers to the name of the property. If the named property doesn't exist, it's created. -destroyprop domain path key Destroy the property with name key in the given path. -destroyval domain path key val Destroy the given value in the property with name key in the given path. -renameprop domain path oldkey newkey Renames the property with name oldkey in the given path. -read domain path Read the properties associated with the directory specified in the given path. -list domain path List the directories in the given domain/path. The directory ID's are listed along with any names they may have. -readprop domain path key Read the values of the given property in the specified directory. -readval domain path key index Read the value at the given index of the named property in the specified directory. -rparent domain Prints the current NetInfo parent of a server. The server should be explicitly given using the -t host/tag option. -resync domain Resynchronizes NetInfo. If a domain name is given, the master resynchronizes all clones. If the -t clone/tag option is used instead of a tag, then only that clone is resynchronized. Using -t master/tag resynchronizes the whole domain. -statistics domain Print server statistics. -domainname domain Print the domain name of the given domain. This is useful when the domain is specified is a relative name (like "." or "..") or when a connection is made using the -t server/tag option. EXAMPLE
"niutil -list . /" list the directories at the top level in the local NetInfo database. SEE ALSO
niload(8), nidump(8), nigrep(1), nifind(1), nireport(1), netinfo(5) Apple Computer, Inc. June 20 1989 NIUTIL(1)
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy