Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gfs_rename(3) [debian man page]

GFS_RENAME(3)															     GFS_RENAME(3)

NAME
gfs_rename - change the name or location of a file SYNOPSIS
#include <gfarm/gfarm.h> char *gfs_rename (char * gfarm_url_from, char * gfarm_url_to); DESCRIPTION
gfs_rename renames a file or directory gfarm_url_from to gfarm_url_to. If gfarm_url_to already exists, it will be replaced. In this case, when gfarm_url_from is a file gfarm_url_to also must be a file, when gfarm_url_from is a directory, gfarm_url_to must be a empty directory. Gfs_rename() can't rename a directory to a subdirectory of itself. RETURN VALUES
NULL The function terminated successfully. GFARM_ERR_NO_MEMORY Insufficient memory was available. GFARM_ERR_AUTHENTICATION User authentication failed when connecting to gfmd(8). GFARM_ERR_PERMISSION_DENIED The parent directory of gfarm_url_from or gfarm_url_to did not allow write permission. GFARM_ERR_INVALID_ARGUMENT A attempt was made to rename the directory gfarm_url_from to a subdirectory of itself. GFARM_ERR_NO_SUCH_OBJECT gfarm_url_from does not exist. GFARM_ERR_IS_A_DIRECTORY gfarm_url_to is a existing directory, though gfarm_url_from is not a directory. GFARM_NOT_IS_A_DIRECTORY gfarm_url_to is not a directory. though gfarm_url_from is a directory. Others An error except the above occurred. The reason is shown by its pointed strings. Gfarm 13 November 2006 GFS_RENAME(3)

Check Out this Related Man Page

GFS_CHMOD(3)															      GFS_CHMOD(3)

NAME
gfs_chmod - change permissions of a file SYNOPSIS
#include <gfarm/gfarm.h> char *gfs_chmod (char * gfarm_url, mode_t mode); DESCRIPTION
gfs_chmod() changes the mode of the file given by gfarm_url. Permission bit masks of mode are similar to ones of mode parameter to chmod(2), though only the least 9 bit are effective. An executable file cannot be changed to a non-executable file and vice versa, unless the number of fragment of the file is only one. In detail, a file has multiple fragments with any execution bit should not be changed to that with no execution bit. It is necessary to have at least one execution bit. Similarly, a file has multiple fragments with no execution bit should not be changed to that with any execu- tion bit. RETURN VALUES
NULL The function terminated successfully. GFARM_ERR_NO_MEMORY Insufficient memory was available. GFARM_ERR_AUTHENTICATION User authentication failed when connecting to gfmd(8) or gfsd(8). GFARM_ERR_PERMISSION_DENIED The parent directory of gfarm_url did not allow write permission. GFARM_ERR_OPERATION_NOT_PERMITTED The effective UID does not match the owner of the file, and is not zero. Or an attempt was made to change an executable file with more than one fragment to a non-executable file, or vice versa. GFARM_ERR_NO_SUCH_OBJECT The file does not exist. GFARM_ERR_NOT_A_DIRECTORY A component of the path prefix is not a directory. Others An error except the above occurred. The reason is shown by its pointed strings. Gfarm 13 November 2006 GFS_CHMOD(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Another hard one, how can I look at a blank directory?

I have the following: (this is a partial listing, security) 4096 Sep 28 16:46 there should be a filename after 16:46, however there isn't. How do I rename this ghost directory? Or cd to it without going to ~. THANKS!! (6 Replies)
Discussion started by: nj78
6 Replies

2. Shell Programming and Scripting

perl rename failed

i have a file, which i want to rename, from my current directory to a backupdirectory. My perl code is below rename($s_filename,$backup.$s_filename ) all my variables are defined. but the rename failed. the file permission my file is "-rw-rw-r--". could this be a problem? I tried to use the... (9 Replies)
Discussion started by: new2ss
9 Replies

3. Shell Programming and Scripting

find and replace in subdirectory (filename & content - both)

Hi, I have to rename all occurance of CUST_MST to RESELLER_MST both in filename and file content under a directory (say D0) which contains multiple (2-3 levels) sub directory. Example: D0 -> D1 -> D2 has a file CUST_MST_TEMP.txt this contains : > cat /D0/D1/D2/CUST_MST_TEMP.txt... (3 Replies)
Discussion started by: sabyasm
3 Replies

4. Shell Programming and Scripting

To check whether a directory is exist and if it is not, create it

Hi, I want to write a shell script to check whether a directory (say A) is existing in a given location and if it is not, create it. (3 Replies)
Discussion started by: sabya
3 Replies

5. UNIX for Dummies Questions & Answers

transfering a directory to the toolman

I have a question about transferring a directory to the toolman. I have a directory called assn3 that contains two txt files and one empty directory and I want to transfer the assn3 to my my tooman account. Every time I try to transfer the file it says that the assn3 is not a regular file! what... (3 Replies)
Discussion started by: aama100
3 Replies

6. UNIX for Dummies Questions & Answers

rename multiple files from search output

Variations of multiple renames seems to come up a lot but i can't find the answer to this situation. Tidying up a directory where people rename files to .working, .bob, .attempt1 & so on. what i am trying to do is: list the file type, & rename from ".whatever" to .fixed. As the ".whatever" is... (5 Replies)
Discussion started by: woodstock
5 Replies

7. Shell Programming and Scripting

Put header if file exists in a directory

Hi all, I will have to check a directory which is full of files. If any file more than 5 MB of space exists, write on it's head "Checked". Please help me. Thanks in advance! Deepak (5 Replies)
Discussion started by: naw_deepak
5 Replies

8. Shell Programming and Scripting

check if a directory exists if not make it

Hey guys im trying to check if the directory exists i get a syntax error on the elif statement iv tried using else and still same result im not sure. If the directory does not exist can i just insert mkdir /tmp/old under the elif once that part gets working if ; then #do nothing elif echo... (20 Replies)
Discussion started by: musicmancanora
20 Replies

9. UNIX for Dummies Questions & Answers

Shell script to rename or change file extension case.

I searched the forum, but there was different type of rename. Hello. I have files in folder. Like: xxxxxxxx1.html or xxxxxxxx2.txt or xxxxxxxx3.tar.gz and how to rename or change file extension case to xxxxxxxx1.htm or xxxxxxx2.TXT or (5 Replies)
Discussion started by: Sheldon
5 Replies

10. Shell Programming and Scripting

How to look for the last file and rename it (sequencially, increment by one)

I need to Ftp a file to a UNIX directory from a windows directory, the file needs to be put sequencially in the UNIX directory , for example: I get the file from the windows directory with the following name. EFT###.DAT, the script needs to look in the UNIX directory and if there are files, for... (5 Replies)
Discussion started by: rechever
5 Replies

11. UNIX for Dummies Questions & Answers

Display all directory/sub directory with occupied space?

Hello, I am using Red Hat linux system. I see my /work directory has used space 300GB. But there are so many sub directory under /work. I want to list each direcotry and under all subdirectory. But i want to know how much space occupied by each directory. What kind of command i can use to... (3 Replies)
Discussion started by: govindts
3 Replies

12. Shell Programming and Scripting

Sum of file size in directory / subdirectory

Hi , I am trying to write something to find the size of particular type of files in a directory & it's subdirectory and sum the size .. These types of file are found at directory level or its subdirectories level .. #!/bin/ksh FNAME='.pdf' S_PATH=/abc/def/xyz find $S_PATH -exec ls -lad... (4 Replies)
Discussion started by: Vaddadi
4 Replies

13. UNIX for Dummies Questions & Answers

Filenames change in a directory

Hi I have abc_ahb_one.v abc_ahb_two.v abc_ahb_three.v ........l like this -----upto abc_ahb_ninety.v in some directory. I need to change those file names to like below. ... (5 Replies)
Discussion started by: praneethk
5 Replies

14. UNIX for Dummies Questions & Answers

delete unix directory

I installed membersgear into my website and decided it was not right for me. I issued rm -r on directory membersgear and it deleted everything except the subdirectory templates_c. I have found several directories in this directory which are named like %%114. Ownership on these directories... (5 Replies)
Discussion started by: pdinardo
5 Replies

15. Shell Programming and Scripting

Rename last directory in a file structure

I have to write a script to rename the every last sub-directory in a directory structure if the last sub-directory name doesn't contain "submitted". eg: given directory path:/u01/home/somedir somedir can have many subdirectories and each subdirectory inturn has many subdirectories. somedir... (3 Replies)
Discussion started by: ramse8pc
3 Replies