*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> mktrashcan (1)              



NAME    [Toc]    [Back]

       mktrashcan,  rmtrashcan,  shtrashcan - Attaches, detaches,
       or shows a trashcan directory

SYNOPSIS    [Toc]    [Back]

       /usr/sbin/mktrashcan trashcan directory...

       /usr/sbin/rmtrashcan directory...

       /usr/sbin/shtrashcan directory...

OPERANDS    [Toc]    [Back]

       Specifies the directory  that  contains  files  that  were
       deleted  from attached directories.  Whenever you delete a
       file in the specified directory, the file system automatically
 moves the file to the trashcan directory.  Specifies
       the directory that you attach to a trashcan directory.

DESCRIPTION    [Toc]    [Back]

       The trashcan utilities (mktrashcan and rmtrashcan)  enable
       you  to  attach or detach an existing directory, which you
       specify as a trashcan directory, to any number of directories
 within the same fileset.

       A  trashcan  directory  stores  the files that are deleted
       with the unlink system call. For instance, you can use the
       mktrashcan  utility  to attach a trashcan directory called
       /usr/trashcan to one or more directories; thereafter, when
       you  delete  a  file from one of the attached directories,
       the file system moves the file to the /usr/trashcan directory.
   Note  that  when  more  than  one directory shares
       attachment to a trashcan directory, files  with  the  same
       file  name can overwrite each other in the trashcan directory.

       If you mistakenly delete a file, use  the  mv  command  to
       return  the  file  from the /usr/trashcan directory to its
       original directory.

       When you enter shtrashcan at the system prompt, the system
       shows  the  trashcan  directory,  if  one  exists, for the
       directory you specified.

       It is important that  trashcan  directories  have  correct
       access  permissions.   If the permissions are too restrictive,
 then it may be impossible to remove files  from  the
       directories  that  are attached to the trashcan directory.
       In general, all users and groups that expect  to  use  the
       trashcan directory need write permission to the directory.
       If unexpected "permission denied" errors occur when deleting
  files  that are in a directory attached to a trashcan
       directory, use the chmod command to change the permissions
       on the trashcan directory.

RESTRICTIONS    [Toc]    [Back]

       The directory and trashcan directories must be in the same
       fileset; however, you can attach the trashcan directory to
       any directory within the fileset.

EXAMPLES    [Toc]    [Back]

       The  following  example  creates  and  attaches a trashcan
       directory, /usr/trashcan, to two directories, /usr/ray and
       /usr/projects/sql/test, which are in the same fileset. The
       chmod command adds write  permission  for  all  users  and
       groups on the new trashcan directory.  % mkdir /usr/trashcan
 % chmod a+w /usr/trashcan %  mktrashcan  /usr/trashcan
       /usr/ray  /usr/projects/sql/test  To  attach  the trashcan
       directory, /usr/trashcan, to  all  subdirectories  in  the
       /usr directory, enter: % mktrashcan /usr/trashcan /usr/*

              New  subdirectories  that  you add beneath the /usr
              directory are not attached to the  trashcan  directory
  until  you  attach them. Also, the mktrashcan
              utility  distinguishes  between   directories   and
              files,  attaching  only directories to the trashcan

              Note that an attached directory produces an EDUPLICATE_DIRS
   (-1165)  error  when  /usr/trashcan  is
              itself in the directory path you attach to  (as  in
              the  previous  example).  You can ignore this error

SEE ALSO    [Toc]    [Back]

       advfs(4), mkfset(8), showfsets(8)

[ Back ]
 Similar pages
Name OS Title
nsg_attach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
nsg_detach_pid Tru64 Attaches a process to, or detaches a process from a NUMA Scheduling Group (libnuma library)
cpusetDetachAll IRIX detaches all threads from a cpuset
pthread_nsg_detach Tru64 Detaches a thread from a NUMA Scheduling Group (libpthread library)
attachcursor IRIX attaches the cursor to two valuators
rpccp_show_group HP-UX Shows the members of a group
ldd IRIX Shows run-time DSO dependencies
rpccp_show_profile HP-UX Shows the elements of a profile
from Tru64 Shows whom mail messages are from
xlvShow IRIX shows information about xlv configuration and objects
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service