|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
tag/mark a file with current absolute path
Hi all,
I need to mark a file with it's current location in the file system before being moved. This will enable the file to be restored back to it's original location. Can anyone provide any ideas about the best way to do this, at present i'm trying to use readlink -m to strip off the absolute path of the file but am unsure if there is any way of marking the file other than simply appending the absolute path as text to the end of it. thanks for any replies skinny |
| Sponsored Links | ||
|
|
|
#2
|
|||
|
|||
|
Maintain a repository that 'remembers' the old absolute path for all your files. It can be db tables or a physical file.
I saw a cvs hack that kept track of files and directories by moving the real file somewhere, then creating a small 6-8 byte file of the same name and checking it into cvs. The downside was setting up dozens of fake source directories. I have never tried this so I cannot vouch for it's robustness. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with absolute path and relative path | mzero | UNIX for Dummies Questions & Answers | 1 | 03-02-2009 09:29 AM |
| How to get Absolute path from file descriptors | vinp | UNIX for Advanced & Expert Users | 2 | 11-16-2007 12:46 AM |
| $PWD shows absolute path vs path w/symbolic links | kornshellmaven | Shell Programming and Scripting | 3 | 06-13-2007 12:15 PM |
| vi - replacing a relative path with absolute path in a file | Yinzer955i | UNIX for Dummies Questions & Answers | 2 | 09-07-2006 11:47 AM |
| want the current directory without the absolute path | olimiles | Shell Programming and Scripting | 2 | 09-01-2006 07:07 AM |