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)
Hi All,
I am coding for a requirement where I need to read a file & get the values of SUB_DATE. Once the dates are found, i need to move the files based on these dates from one directory to another.
ie, this is how it will be in the file,
SUB_DATE = 20120608,20120607,20120606,20120606... (5 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 directory e2e_ms_xfer/cent01
this contains the multiple files some of which will be named below with unique date time stamps
e2e_ms_edd_nom_CCYYMMDD_HHMM.csv
What I want to do is in a loop
1) Get the oldest file
2) Rename
3) Move it up one level from e2e_ms_xfer/cent01 to... (1 Reply)
I have a directory e2e_ms_xfer/cent01
this contains the multiple files some of which will be named below with unique date time stamps
e2e_ms_edd_nom_CCYYMMDD_HHMM.csv
What I want to do is in a loop
1) Get the oldest file
2) Rename
3) Move it up one level from e2e_ms_xfer/cent01 to... (1 Reply)
Hi,
Currently I'm moving the files based on date like below.
"mv *20150901* backup_folder" - Limitation: can move only 1 day files to backup folder.
I want to move the files of different dates like 20150901,02, 03, 04.....
Is there any single command to do it.
Thanks in advance!! (2 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)
Hi All,
We have main directory called "head"
under this we have several sub directories and under these directories we have sub directories.
My requirement is I have to find the SQL files which are having the string "procedure" under "head" directory and sub directories as well.
And create... (14 Replies)
Discussion started by: ROCK_PLSQL
14 Replies
LEARN ABOUT NETBSD
opendisk
OPENDISK(3) BSD Library Functions Manual OPENDISK(3)NAME
opendisk -- open a disk partition
LIBRARY
System Utilities Library (libutil, -lutil)
SYNOPSIS
#include <util.h>
int
opendisk(const char *path, int flags, char *buf, size_t buflen, int iscooked);
DESCRIPTION
opendisk() opens path, for reading and/or writing as specified by the argument flags using open(2), and the file descriptor is returned to
the caller. buf is used to store the resultant filename. buflen is the size, in bytes, of the array referenced by buf (usually MAXPATHLEN
bytes). iscooked controls which paths in /dev are tried.
opendisk() attempts to open the following variations of path, in order:
path The pathname as given.
pathX path with a suffix of 'X', where 'X' represents the raw partition of the device, as determined by getrawpartition(3), usually
``c''.
If path does not contain a slash (``/''), the following variations are attempted:
- If iscooked is zero:
/dev/rpath path with a prefix of ``/dev/r''.
/dev/rpathX path with a prefix of ``/dev/r'' and a suffix of 'X' (q.v.).
- If iscooked is non-zero:
/dev/path path with a prefix of ``/dev/''.
/dev/pathX path with a prefix of ``/dev/'' and a suffix of 'X' (q.v.).
RETURN VALUES
An open file descriptor, or -1 if the open(2) failed.
ERRORS
opendisk() may set errno to one of the following values:
[EINVAL] O_CREAT was set in flags, or getrawpartition(3) didn't return a valid partition.
[EFAULT] buf was the NULL pointer.
The opendisk() function may also set errno to any value specified by the open(2) function.
SEE ALSO open(2), getrawpartition(3)HISTORY
The opendisk() function first appeared in NetBSD 1.3.
BSD December 11, 2001 BSD