Sponsored Content
Top Forums UNIX for Advanced & Expert Users how to find complete path of a file in unix Post 302218332 by yahoo! on Friday 25th of July 2008 01:48:45 AM
Old 07-25-2008
MySQL how to find complete path of a file in unix

hi experts(novice people can stay away as it is no child's game),

i am developing a script which works like recycle bin of windows.

the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to capture the path of the file.

eg:--

i am presently working in /fs/home/u1/proj

and i am trying to delete files of parent directory or parent's parent directory as shown below......

/fs/home/u1/proj> rm ..file1

dont get confused as "rm" has been aliased with "mv" command which will move the "file1" to a directory called "recyclebin".....

My intention is to move the file1 along with its complete path so that i can retreive it back to the original directory from where it got deleted as happens in Windows(Recycle bin)........

hope there is some command such as "dirname" or something of that sort....Smilie

Thanks in advance....................
Last edited by yahoo!; 23 Minutes Ago at 04:51 PM. Reason: it does not make sense
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

ls -R command but need complete path name on each line

Can anyone help me with the following: I need to traverse subdirectories to create a list of files with the pathname. For example, here's what I get with a simple ls -alR command: /MAIN/data/30007390 dte2>>ls -alR .: total 2 drwxrwx--- 4 ecfadmin staff 96 Oct 24 18:35 . ... (2 Replies)
Discussion started by: condor4-2
2 Replies

2. HP-UX

URGENT: UNIX FTP cannot find path error

Dear all We are currently working on to install some ERP system in wjhich we need to FTP from unix to windows 2000 machine We run ./lodrun to get files from d/xxxxx/xxxx directory but the ftpoutput.log file shows following error FTP: xxxxxxxxx system cannot find the path specified... (1 Reply)
Discussion started by: minix
1 Replies

3. UNIX for Dummies Questions & Answers

how to find complete path of a file in unix

hi experts(novice people can stay away as it is no child's game), i am developing a script which works like recycle bin of windows. the problem i am facing is that when ever i am trying to delete a file which is situated in parent directory or parent's parent directory i am unable to capture... (5 Replies)
Discussion started by: yahoo!
5 Replies

4. UNIX for Dummies Questions & Answers

how to find a path within unix root directory

I need to know whether nyfile/mypath exists on the file system in the root directory. How to do this (1 Reply)
Discussion started by: ramky79
1 Replies

5. UNIX for Dummies Questions & Answers

Find unix path to a file?

I know this is very newbie ... but I need help determining the proper file path to file...Have no idea how to do this I'm on a Mac OS X 10.6 Snow Leopard thanks very much (4 Replies)
Discussion started by: jmarc
4 Replies

6. Shell Programming and Scripting

How to a find a file in which path it is there?

Hi Firends, Good Morning to all, I want a find command to search a paticular file present in my system(ie search through under all users and all directories.) I am looking forward from you.:) Advance Thanks, Siva Ranganath CH (3 Replies)
Discussion started by: sivaranga001
3 Replies

7. UNIX for Dummies Questions & Answers

How to get complete path in variable excluding last word?

Hello Experts, Can you please help me by providing a code which can give me the complete path except last word in a variable, the variable i can use anywhere else for my operation eg: if this below one is my path: ... (3 Replies)
Discussion started by: aks_1902
3 Replies

8. Shell Programming and Scripting

How to find complete file names in UNIX if i know only extention of file

Suppose I have a file which contains other file names with some extention . text file containt gdsds sd8ef g/f/temp_temp.sum yyeta t/unix.sum ghfp hrwer h/y/test.text.dat if then.... I want to get the complete file names, like for above file I should get output as temp_temp.sum... (4 Replies)
Discussion started by: panchal
4 Replies

9. Shell Programming and Scripting

Unix Scripting : Sort a Portion of a File and not the complete file

Need to sort a portion of a file in a Alphabetical Order. Example : The user adam is not sorted and the user should get sorted. I don't want the complete file to get sorted. Currently All_users.txt contains the following lines. ############## # ARS USERS ############## mike, Mike... (6 Replies)
Discussion started by: evrurs
6 Replies

10. Shell Programming and Scripting

Find and Replace Path in UNIX

Hi All, How can i find and replace the one path to another path with in the file. For Example: Search_path=/search/path replace_path=/replace/path I used the following command but not usefull, please help me regarding the same. sed 's_/search/path_/replace/path_' file_name >... (6 Replies)
Discussion started by: nsyed.dw
6 Replies
VFS_RECYCLE(8)															    VFS_RECYCLE(8)

NAME
vfs_recycle - Samba VFS recycle bin SYNOPSIS
vfs objects = recycle DESCRIPTION
This VFS module is part of the samba(7) suite. The vfs_recycle intercepts file deletion requests and moves the affected files to a temporary repository rather than deleting them immedi- ately. This gives the same effect as the Recycle Bin on Windows computers. The Recycle Bin will not appear in Windows Explorer views of the network file system (share) nor on any mapped drive. Instead, a directory called .recycle will be automatically created when the first file is deleted and recycle:repository is not configured. If recycle:reposi- tory is configured, the name of the created directory depends on recycle:repository. Users can recover files from the recycle bin. If the recycle:keeptree option has been specified, deleted files will be found in a path identical with that from which the file was deleted. This module is stackable. OPTIONS
recycle:repository = PATH Path of the directory where deleted files should be moved. If this option is not set, the default path .recycle is used. recycle:directory_mode = MODE Set MODE to the octal mode the recycle repository should be created with. The recycle repository will be created when first file is deleted. If recycle:subdir_mode is not set, MODE also applies to subdirectories. If this option is not set, the default mode 0700 is used. recycle:subdir_mode = MODE Set MODE to the octal mode with which sub directories of the recycle repository should be created. If this option is not set, subdirectories will be created with the mode from recycle:directory_mode. recycle:keeptree = BOOL Specifies whether the directory structure should be preserved or whether the files in a directory that is being deleted should be kept separately in the repository. recycle:versions = BOOL If this option is True, two files with the same name that are deleted will both be kept in the repository. Newer deleted versions of a file will be called "Copy #x of filename". recycle:touch = BOOL Specifies whether a file's access date should be updated when the file is moved to the repository. recycle:touch_mtime = BOOL Specifies whether a file's last modified date should be updated when the file is moved to the repository. recycle:minsize = BYTES Files that are smaller than the number of bytes specified by this parameter will not be put into the repository. recycle:maxsize = BYTES Files that are larger than the number of bytes specified by this parameter will not be put into the repository. recycle:exclude = LIST List of files that should not be put into the repository when deleted, but deleted in the normal way. Wildcards such as * and ? are sup- ported. recycle:exclude_dir = LIST List of directories whose files should not be put into the repository when deleted, but deleted in the normal way. Wildcards such as * and ? are supported. recycle:noversions = LIST Specifies a list of paths (wildcards such as * and ? are supported) for which no versioning should be used. Only useful when recy- cle:versions is enabled. EXAMPLES
Log operations on all shares using the LOCAL1 facility and NOTICE priority: [global] vfs objects = recycle recycle:facility = LOCAL1 recycle:priority = NOTICE VERSION
This man page is correct for version 3.0.25 of the Samba suite. AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. VFS_RECYCLE(8)
All times are GMT -4. The time now is 03:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy