Solved

Problem with implementing Recycle bin

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

758 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

23 Experts available now in Live!

Get 1:1 Help Now