Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rmtrashcan(1) [osf1 man page]

mktrashcan(1)						      General Commands Manual						     mktrashcan(1)

NAME
mktrashcan, rmtrashcan, shtrashcan - Attaches, detaches, or shows a trashcan directory SYNOPSIS
/usr/sbin/mktrashcan trashcan directory... /usr/sbin/rmtrashcan directory... /usr/sbin/shtrashcan directory... OPERANDS
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
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 impossi- ble 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
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
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 directory. 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 message. SEE ALSO
advfs(4), mkfset(8), showfsets(8) mktrashcan(1)

Check Out this Related Man Page

advfs_err(4)						     Kernel Interfaces Manual						      advfs_err(4)

NAME
advfs_err - Lists and describes error messages DESCRIPTION
This following list provides the error number and a brief description of the error: EHANDLE_OVF Out of memory. EINVALID_HANDLE The access structure handle is out of range. E_DOMAIN_PANIC This is an internal AdvFS error that occurs when an AdvFS routine fails due to the domain already being paniced. The error propa- gates to the user as E_IO. EDUP_VD The volume is already in use by a domain. EBAD_VDI The specified volume index is not a valid index in the domain. ENO_SUCH_DOMAIN The specified domain does not exist. ENO_SUCH_TAG The bitfile does not exist. ENO_MORE_DOMAINS The maximum number of file domains are active; cannot activate another file domain. EBAD_DOMAIN_HANDLE The specified domain handle is not valid. E_PAGE_NOT_MAPPED The specified file page is not allocated and does not exist. ENO_XTNTS An advfs internal error when opening a file causes file storage to be inaccessible. EBAD_TAG The file tag is not what was expected. EXTND_FAILURE Out of extents to describe disk blocks. ENO_MORE_BLKS The domain is out of disk space. ENOT_SUPPORTED The requested function is not currently supported. EBAD_PARAMS Invalid parameters were passed to the kernel. The likely cause is that the command or utility belongs to a previous version of the product, while the system is running a later version. EBMTR_NOT_FOUND The file metadata was not found. ETOO_MANY_SERVICE_CLASSES Service class array overflow. EBAD_SERVICE_CLASS The disk service class does not match the service class array entry. ESERVICE_CLASS_NOT_FOUND The requested service class does not exist. ESERVICE_CLASS_NOT_EMPTY There is an attempt to delete a service class that still has a disk in it. EBAD_FTX_AGENTH Invalid transaction identification. EBAD_PAR_FTXH Invalid parent transaction handle. EFTX_TOO_DEEP Transactions are nested too deeply. EBAD_FTXH Invalid transaction handle. EBAD_STO_DESC The storage descriptor for the storage requested is invalid. ENO_MORE_MEMORY The file system (advfs) ran out of memory. ENO_MORE_MCELLS A file descriptor could not be allocated. The system is most likely out of disk space. EALREADY_ALLOCATED Attempt to add storage to a file at a specified page offset and the page at that offset already exists. E_NO_MORE_LOG_DESC Too many threads are reading the transaction log. E_CANT_CREATE_LOG There was a failure during log initialization. E_VOLUME_COUNT_MISMATCH The number of volumes in /etc/fdmns/domain_name does not match the number of volumes in the BMT. E_LOG_EMPTY There are no transactions in the log. E_LOG_FULL There is no more room for transactions in the log. E_INVALID_REC_ADDR The log entry has an invalid LSN. E_BAD_CLIENT_REC_ADDR No such log entry exists. E_CANT_ACCESS_LOG An error occurred while creating the file domain transaction log, initializing the file domain transaction log, or both. Since you cannot use the file domain, you must recreate it. E_DOMAIN_NOT_ACTIVATED The file domain is not active; it must be active to perform the requested function. E_DOMAIN_NOT_CLOSED Some thread is still accessing the domain during domain activation. E_CANT_DISMOUNT_VD1_ACTIVE_DOMAIN Dirty buffers prevent the fileset from being dismounted. E_BAD_VERSION The command or utility version does not match the advfs kernel version. See EBAD_PARAMS (-1042). E_VD_BFDMNID_DIFF The volume has the wrong domain ID. E_CANT_FIND_LOG_END There is an error in finding the end of the log. E_BAD_MCELL_LINK_SEGMENT A file's primary mcell has a nonzero linkSegment. E_VD_DMNATTR_DIFF Some of the disks listed in fdmns directory for the file domain do not belong to the file domain. The fdmns directory entry for this file domain is invalid. E_MUST_BE_ROOT You must have root privilege to perform the requested function. E_TAG_EXISTS Specified tag to use next already is in use. E_DOMAIN_ALREADY_EXISTS The specified file domain already exists. E_NO_SUCH_BF_SET The specified fileset does not exist. E_BAD_BF_SET_HANDLE The specified bitfile set handle is invalid. E_TOO_MANY_BF_SETS The maximum number of filesets are mounted. Cannot mount the fileset. E_TOO_MANY_ACCESSORS The fileset is active (mounted). The fileset must be inactive (unmounted) to perform the requested function. E_NOT_ENOUGH_DISKS There is no more room on the disks in the selected service class. E_BAD_DEV The file domain volume is an invalid device. E_ADVFS_NOT_INSTALLED The file system (advfs) is not installed or it is installed but the new kernel (vmunix) is not currently running; in the latter case, you need to reboot the system to complete the advfs installation. E_READ_ONLY The file set is read only. E_TOO_MANY_CLONES The specified fileset has the maximum number of clone filesets. You cannot create another clone fileset. E_OUT_OF_SYNC_CLONE The clone file is no longer correct due to running out of disk space during a copy on write. E_HAS_CLONE The original fileset has a clone fileset. The original fileset must not have a clone fileset to perform the requested function. E_TOO_MANY_BITFILES The number of files in the fileset has exceeded the quota. E_TOO_MANY_BLOCKS The number of disk blocks used by a fileset has exceeded the quota. E_QUOTA_NOT_ENABLED The quota type is not enabled. E_IO I/O error detected. E_NO_MORE_DQUOTS Out of memory. E_DUPLICATE_SET The fileset already exists. E_CANT_CLONE_A_CLONE You cannot create a clone fileset from a clone fileset. E_ACCESS_DENIED Permission denied for the requested function. E_BLKOFFSET_NOT_PAGE_ALIGNED During migration, a disk block offset in an extent is not page aligned. E_CANT_MIGRATE_HOLE An attempt to migrate a sparse file page range and all the pages in the range do not exist. E_NOT_OWNER The user, who is not the owner of the AdvFS resource, has attempted an AdvFS operation, such as changing an AdvFS fileset name. E_MIGRATE_IN_PROGRESS An attempt to migrate a file failed because another thread is already migrating the file. Only one active migrate is allowed for a specified file. E_INVALID_FS_VERSION The installed version of advfs is not compatible with the on-disk file domain. E_INVALID_ADVFS_STRUCT The on-disk file domain structures are invalid. E_PAGE_HOLE The page offset specified for the file is within a sparse file hole. E_TOO_MANY_VIRTUAL_DISKS The maximum number of volumes per domain has been reached. ENO_NAME The file system (advfs) cannot generate the path name of a file because the original path name has been deleted. EDIR_NOT_ADVFS A trashcan operation was attempted on a non-advfs directory. EUNDEL_DIR_NOT_ADVFS A user attempted to use a non-advfs directory for a trashcan. EDUPLICATE_DIRS A user attempted to attach a directory to itself as a trashcan. EDIFF_FILE_SETS A user attempted to attach a trashcan to a directory in a different fileset. A trashcan must be in the same fileset as the direc- tory. E_BAD_MAGIC The specified disks do not contain a valid advfs file domain. E_BAD_PAGESIZE An advfs internal error when opening a file causes the file storage to be inaccessible. E_NO_DMN_VOLS The file domain contains no volumes. E_BAD_TAGDIR There is a corrupted page in the tag directory. E_ALREADY_SWITCHING_LOGS A request to switch log volumes was made to a domain that is in the process of switching log volumes. E_NO_UNDEL_DIR A user attempted to remove a trashcan from a directory that has no trashcan. E_QUOTA_NOT_MAINTAINED The quota type is not maintained. E_BMT_NOT_EMPTY An attempt to remove a volume failed because the contents of the inode table could not be moved off of the volume. E_ROOT_TAGDIR_ON_VOL An attempt to remove a volume failed because the root tag directory is located on the specified volume and could not be moved off of the volume. E_LOG_ON_VOL An attempt to remove a volume failed because the log is located on the specified volume and could not be moved off of the volume. E_VOL_NOT_IN_SVC_CLASS The selected disk is not in the requested service class. E_WOULD_BLOCK The request call to lgr_flush_start would block. E_ALREADY_STRIPED An attempt to stripe a file that is already striped. E_NO_CLONE_STG An attempt to migrate a clone but the clone has no storage of its own. E_BAD_PAGE_RANGE The specified page range is not valid. E_INVOLUNTARY_ABORT A migrate operation has been aborted by another thread. For example, a remove volume operation can cause a file's migrate to abort. E_RMVOL_ALREADY_INPROG A remove volume operation on a volume in the specified domain is already active. There can only be one active remove volume opera- tion per domain. SEE ALSO
advfs(4) advfs_err(4)
Man Page