Solved

Problem with implementing Recycle bin

Posted on 2001-07-16
2
209 Views
Last Modified: 2010-04-21
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
Comment
Question by:prashant_n_mhatre
2 Comments
 
LVL 38

Accepted Solution

by:
yuzh earned 50 total points
ID: 6288344
hi  prashant_n_mhatre,

    try to this in your function:

    mv $1 ~/.trashcan /$1

 Regs
    yuzh
0
 
LVL 4

Author Comment

by:prashant_n_mhatre
ID: 6290631
thanks a lot yuzh ....It works!!!
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question