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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
gfs_pio_create
GFS_PIO_CREATE(3) GFS_PIO_CREATE(3)
NAME
gfs_pio_create - create a file in the Gfarm file system
SYNOPSIS
#include <gfarm/gfarm.h>
gfarm_error_t gfs_pio_create (const char * gfarm_url, int flags, gfarm_mode_t mode, GFS_File * gfp);
DESCRIPTION
gfs_pio_create() creates a new file in the Gfarm file system whose name is the string pointed to by gfarm_url with the access mode mode,
and returns a GFS_File structure to the address pointed to by gfp. Mode specifies the file permissions to be created, and is modified by
the process's umask.
The flags argument has the same meaning as the second argument of gfs_pio_open(), including the point such that exactly one of
GFARM_FILE_RDONLY, GFARM_FILE_WRONLY, and GFARM_FILE_RDWR should be specified.
Note that GFARM_FILE_TRUNC must be explicitly specified by the flags argument if needed.
RETURN VALUES
GFARM_ERR_NO_ERROR
The function terminated successfully.
GFARM_ERR_IS_A_DIRECTORY
gfarm_url refers to a directory.
GFARM_ERR_IS_A_SYMBOLIC_LINK
gfarm_url refers to a symbolic link.
GFARM_ERR_OPERATION_NOT_PERMITTED
gfarm_url refers to not a regular file.
GFARM_ERR_NOT_A_DIRECTORY
A component used as a directory in gfarm_url is not, in fact, a directory.
GFARM_ERR_PERMISSION_DENIED
The requested access to the file is not allowed, or one of the directories in gfarm_url did not allow search (execute) permission,
or the file did not exist yet and write access to the parent directory is not allowed. Or, the authentication to the metadata
server fails.
GFARM_ERR_NO_MEMORY
Insufficient memory was available.
GFARM_ERR_INVALID_ARGUMENT
flags is not valid.
GFARM_ERR_GFARM_URL_HOST_IS_MISSING
gfarm_url does not include a metadata server.
GFARM_ERR_GFARM_URL_PORT_IS_MISSING
gfarm_url does not include a port number of the metadata server.
GFARM_ERR_UNKNOWN_HOST
The metadata server cannot be resolved.
GFARM_ERR_TOO_MANY_OPEN_FILES
The process opens too many files.
GFARM_ERR_TOO_MANY_OPEN_FILES_IN_SYSTEM
The system limit on the total number of open files has been reached.
GFARM_ERR_NETWORK_IS_UNREACHABLE
Network is unrechable.
GFARM_ERR_OPERATION_TIMED_OUT
Connetion timeout occurs.
GFARM_ERR_PROTOCOL
Protocol error occurs.
GFARM_ERR_BROKEN_PIPE
Connection to the metadata server is broken.
GFARM_ERR_PROTOCOL_NOT_SUPPORTED
Specified authentication protocol is not supported.
GFARM_ERR_AUTHENTICATION
User authentication failed when connecting to the metadata server.
Others An error except the above occurred. The reason is shown by gfarm_error_string(3).
SEE ALSO
gfs_pio_close(3), gfs_pio_create(3), gfs_pio_eof(3), gfs_pio_error(3), gfs_pio_flush(3), gfs_pio_getc(3), gfs_pio_getline(3),
gfs_pio_open(3), gfs_pio_putc(3), gfs_pio_putline(3), gfs_pio_puts(3), gfs_pio_read(3), gfs_pio_seek(3), gfs_pio_ungetc(3),
gfs_pio_write(3)
Gfarm 27 June 2010 GFS_PIO_CREATE(3)