given a relative path, how do i convert it into a full one. i.e. if i am in
/home/polypus
and i am given foo/bar then to get a full path i can just concatinate it with pwd, but what if i am given "../mama"
how do i programmatically convert:
/home/polypus and ../mama into ... (4 Replies)
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)
Hi,
Is there a command that tells you right away the current working directory? I know the command "pwd", but that one gives the full path.
if pwd gives me:
/a/b/c/d/ggg/HERE
I want something that will give me:
HERE
Thanks,
Gaurab (13 Replies)
Hey
I'm new to the forums here, and I'm seeking help for this script that I'm writing. When I do ls -l of a directory it shows the full pathname for files in it. For example, if the directory is /internet/post/forum/ and the file is topic, it currently shows internet/post/forum/topic. What's the... (3 Replies)
I'm running AIX unix korn shell. If I echo $0, I only get the filename, it does not have the directory name also. So when I do: `dirname $0` it returns a . (meaning current directory). How get $0 to return the full path/filename? Do I need something in my .profile? Thank you. (8 Replies)
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)
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)
What is the difference ../directory path and ./directory path in ksh? (1 Reply)
Discussion started by: TestKing
1 Replies
LEARN ABOUT OSF1
ncheck
ncheck(8) System Manager's Manual ncheck(8)NAME
ncheck - lists i-number or tag and path name for files in a local file system.
SYNOPSIS
/usr/sbin/ncheck [-i numbers] [-asm] file_spec [file_spec...]
PARAMETERS
Specifies one or more file systems. Specify any file system by entering its full path name or its mount point. The full path name is the
name entered in the file-spec field of the file system's entry in the /etc/fstab file. The mount point is the name entered in the
mnt_point field of the file system's entry in the /etc/fstab file.
You can also specify a UFS file system by entering the name of its device special file. For example: /dev/disk/dsk3c.
You can also specify an AdvFS fileset by entering the name of the file domain, a pound sign (#) character, and the name of the file-
set. For example: root_domain#root.
FLAGS
Includes in the list the path names . (dot) and .. (dot dot), which are ordinarily suppressed. Lists only those files with the specified
i-numbers (UFS) or tags (AdvFS). If you enter a zero (0) all allocated numbers will be displayed. Includes in the list the mode, UID, and
GID of the files. To use this flag you must also specify either the -i or the -s flag on the command line. Lists only the special files
and files with set-user-ID mode.
DESCRIPTION
The ncheck command with no flags generates a list of all files on every specified file system. The list includes the path name and the
corresponding i-number or tag of each file. Each directory file name in the list is followed by a /. (slash dot). Use the available flags
to customize the list to include or exclude specific types of files.
The files are listed in order by i-number or tag. To sort the list in a more useful format, pipe the output to the sort command.
NOTES
The term file_spec represents either a UFS file system or an AdvFS fileset.
To uncover concealed violations of security policy, that is, the inappropriate use of the set-user-ID mode, issue the command with the -s
flag to list only special files and files with set-user-ID mode.
RESTRICTIONS
You must be the root user to use this command.
The ncheck command checks the /etc/fstab file for the specified domain and file system entry. If there is no entry in /etc/fstab for the
specified file system, an error message is displayed to indicate that the file does not exist.
DIAGNOSTICS
When the file system structure is improper, ?? (question mark question mark) denotes the parent of a parentless file. A path name begin-
ning with ... (dot dot dot) denotes a loop.
ERRORS
The ncheck command can be used only for checking local file systems. The "nnn" string identifies the file system type.
FILES
Specifies the command path
RELATED INFORMATION sort(1), quot(8). delim off
ncheck(8)