Sponsored Content
Top Forums Shell Programming and Scripting Script to move certain no. of files every second Post 303001446 by RudiC on Thursday 3rd of August 2017 03:44:48 PM
Old 08-03-2017
How about renaming the directory?
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to move trace files

Please debug this shell script for me.. Basically the idea is to run the script, based on the command to move some trace files to a separate directory and I am getting the error. Only the COMMAND that has rm {} works and I basically want to use it for the fourth one. Please try for the 2nd, 3rd and... (4 Replies)
Discussion started by: ST2000
4 Replies

2. UNIX for Dummies Questions & Answers

Script to move blank files

Anyone could give me an example of scrip to move blank files found into a dir? Thanks, Leandro Takeda (3 Replies)
Discussion started by: letakeda
3 Replies

3. Shell Programming and Scripting

Perl script to move files not in use

I need to write a script to move files only when they are not in use. I have a rudementry bash script for Linux but i need a perl script so it will work on Linux and hpux. Oracle writes files to a directory called /data and the files there are moved every 5 minutes to a new home. But i need to... (1 Reply)
Discussion started by: insania
1 Replies

4. Shell Programming and Scripting

Need script to move files based on name

Hi folks, I'm new here and appreciate greatly any help. I have a bunch of files that need be moved and renamed. Fortunately, they are all in sequence... Present filename and path: /.catalog1/t76038_842-01 Move to: /.catalog1/76038-01 So, we need to drop the... (8 Replies)
Discussion started by: axslinger
8 Replies

5. Shell Programming and Scripting

Need shell script to move files

Hi , I need a simple shell script to move the files from one directory to another directory after every 1 hour..!!! ?? (1 Reply)
Discussion started by: SARAL SAXENA
1 Replies

6. Shell Programming and Scripting

help with a script to gzip/move files

Hi Please can you help me in writing a script to find files on a specific directory, and of extension "tap" but only of the month of september, gzip and move them to another directory. Your help will be appreciated. (4 Replies)
Discussion started by: fretagi
4 Replies

7. Shell Programming and Scripting

Script move files by name

hi, I have a lot of files named xxxxx__AA.txt, xxxxx__BB.txt, xxxxx__CC.txt and I would like to move xxxxx__AA.txt in AA directory, xxxxx__BB.txt in BB etc. Could you help me do it in bash script? (5 Replies)
Discussion started by: corfuitl
5 Replies
VOP_LOOKUP(9)						   BSD Kernel Developer's Manual					     VOP_LOOKUP(9)

NAME
VOP_LOOKUP -- lookup a component of a pathname SYNOPSIS
#include <sys/param.h> #include <sys/vnode.h> #include <sys/namei.h> int VOP_LOOKUP(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp); DESCRIPTION
This entry point looks up a single pathname component in a given directory. Its arguments are: dvp The locked vnode of the directory to search. vpp The address of a variable where the resulting locked vnode should be stored. cnp The pathname component to be searched for. Cnp is a pointer to a componentname structure defined as follows: struct componentname { /* * Arguments to lookup. */ u_long cn_nameiop; /* namei operation */ u_long cn_flags; /* flags to namei */ struct thread *cn_thread; /* thread requesting lookup */ struct ucred *cn_cred; /* credentials */ /* * Shared between lookup and commit routines. */ char *cn_pnbuf; /* pathname buffer */ char *cn_nameptr; /* pointer to looked up name */ long cn_namelen; /* length of looked up component */ u_long cn_hash; /* hash value of looked up name */ long cn_consume; /* chars to consume in lookup() */ }; Convert a component of a pathname into a pointer to a locked vnode. This is a very central and rather complicated routine. If the file sys- tem is not maintained in a strict tree hierarchy, this can result in a deadlock situation. The cnp->cn_nameiop argument is LOOKUP, CREATE, RENAME, or DELETE depending on the intended use of the object. When CREATE, RENAME, or DELETE is specified, information usable in creating, renaming, or deleting a directory entry may be calculated. Overall outline of VOP_LOOKUP: Check accessibility of directory. Look for name in cache, if found, then return name. Search for name in directory, goto to found or notfound as appropriate. notfound: If creating or renaming and at end of pathname, return EJUSTRETURN, leaving info on available slots else return ENOENT. found: If at end of path and deleting, return information to allow delete. If at end of path and renaming, lock target inode and return info to allow rename. If not at end, add name to cache; if at end and neither creating nor deleting, add name to cache. LOCKS
The directory, dvp should be locked on entry. If an error (note: the return value EJUSTRETURN is not considered an error) is detected, it will be returned locked. Otherwise, it will be unlocked unless both LOCKPARENT and ISLASTCN are specified in cnp->cn_flags. If an entry is found in the directory, it will be returned locked. RETURN VALUES
Zero is returned with *vpp set to the locked vnode of the file if the component is found. If the component being searched for is ".", then the vnode just has an extra reference added to it with vref(9). The caller must take care to release the locks appropriately in this case. If the component is not found and the operation is CREATE or RENAME, the flag ISLASTCN is specified and the operation would succeed, the spe- cial return value EJUSTRETURN is returned. Otherwise, an appropriate error code is returned. ERRORS
[ENOTDIR] The vnode dvp does not represent a directory. [ENOENT] The component dvp was not found in this directory. [EACCES] Access for the specified operation is denied. [EJUSTRETURN] A CREATE or RENAME operation would be successful. SEE ALSO
vnode(9), VOP_ACCESS(9), VOP_CREATE(9), VOP_MKDIR(9), VOP_MKNOD(9), VOP_RENAME(9), VOP_SYMLINK(9) HISTORY
The function VOP_LOOKUP appeared in 4.3BSD. AUTHORS
This manual page was written by Doug Rabson, with some text from comments in ufs_lookup.c. BSD
November 24, 1997 BSD
All times are GMT -4. The time now is 11:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy