Solved

Problem with implementing Recycle bin

Posted on 2001-07-16
2
206 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
reinstall 1 70
auto mounter on solaris 1 52
Unix Command -- Challenging  question 7 87
add some character at the end of line in vi 7 64
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now