• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

Problem with implementing Recycle bin

I'm trying to implement idea similar to recycle bin
in DYNIX/PTX.

When I say

>> mv log.txt ~/.trashcan  (works)


But when I tried:


function can        
{                  
  mv $1 ~/.trashcan
}                  

>> can log.txt

It says:

mv: Target must be directory                        
Usage: mv [-e ignore|warn|force] [-fi] f1 f2        
       mv [-e ignore|warn|force] [-fi] f1 ... fn d1
       mv [-e ignore|warn|force] [-fi] d1 d2    

.trashcan is already a directory.

What is the problem with it?    
0
prashant_n_mhatre
Asked:
prashant_n_mhatre
1 Solution
 
yuzhCommented:
hi  prashant_n_mhatre,

    try to this in your function:

    mv $1 ~/.trashcan /$1

 Regs
    yuzh
0
 
prashant_n_mhatreAuthor Commented:
thanks a lot yuzh ....It works!!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now