full path of a file situated either in parent's dir. or parent's parent dir. so on...

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....

Thanks in advance....................

No duplicate or cross-posting, read the rules.

Proceed here:

http://www.unix.com/unix-dummies-questions-answers/74582-how-find-complete-path-file-unix.html\#post302218015

Thread closed.