I note that your 1st post in this thread says you're looking for SQL files, but in post #3 in this thread your code is looking for sql files. The following assumes that your files follow the convention used in post #3. In the future, please state your requirements clearly in your first post. Changing requirements with each new post in a thread wastes everyone's time.
In the future, PLEASE tell us what operating system and shell you're using, so volunteers here don't waste their time making suggestions that won't work in your environment. We should not have to search through dozens of your earlier posts to guess at your environment so we can help you each time you start a new thread.
Obviously, you'll need to change /absolute/path/to/head in the above script to the actual absolute pathname of the head directory you want to use. (You didn't give a pathname for this directory in your first post and the 3rd post in this thread gives conflicting locations for it.)
Is this possible? Let me know If I need specify further on what I am trying to do- I just want to spare you the boring details of my personal file management.
Thanks in advance-
Brian- (2 Replies)
I Need help for one requirement,
I want to move the latest/Older file in the folder to another file. File have the datetimestamp in postfix.
Example:
Source Directory : \a
destination Directory : \a\b
File1 : xy_MMDDYYYYHHMM.txt (xy_032120101456.txt)
File2: xy_MMDDYYYYHHMM.txt... (1 Reply)
Hi All,
I am coding for a requirement where I need to move files (filename.yymmdd) from one directory(A) to another(B) based on 2 date fields in a paramtere file. (Paramfile.txt)
For e.g: In Paramfile.txt,
BUS_DT =20120612
SUB_DT =20120602
In this case, i need to move all the files... (14 Replies)
Hi,
need to zip all files in a directory and move to another directory after the zip..
i am using this one but didnt help me...
zip -r my_proj_`date +%Y%m%d%H%MS`.zip /path/my_proj
mv in_proj_`date +%Y%m%d%H%M%S`.zip /path/source/
i am trying to zip all the files in my_proj... (0 Replies)
I have a number of files in a directory that can be grouped with something like "ls | grep SH2". I would like to move each file in this list to another directory.
Thanks (4 Replies)
Hi all,
i have a folder, with tons of files containing as following,
on /my/folder/jobs/
some_name_2016-01-17-22-38-58_some name_0_0.zip.done
some_name_2016-01-17-22-40-30_some name_0_0.zip.done
some_name_2016-01-17-22-48-50_some name_0_0.zip.done
and these can be lots of similar files,... (6 Replies)
Hi All,
Daily i am doing the house keeping in one of my server and manually moving the files which were older than 90 days and moving to destination folder.
using the find command . Could you please assist me how to put the automation using the shell script .
... (11 Replies)
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Discussion started by: digioleg54
9 Replies
LEARN ABOUT OSF1
rmtrashcan
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)