Sponsored Content
Top Forums Shell Programming and Scripting Shell script to move files to 3 different folders Post 302334062 by sighK on Tuesday 14th of July 2009 04:25:03 PM
Old 07-14-2009
finish

try cp -R instead of just cp

cp -R will copy subdirs also
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to move files into different folders based on filename

I need to move a bunch of files into folders that have the same name. I wanted to either do this with some filter command or some type of batch file that I could save that would already include all of the mv commands since I will have to do this process often. Whatever method you think is easier. ... (7 Replies)
Discussion started by: italia5
7 Replies

2. UNIX for Dummies Questions & Answers

Move folders containing certain files

Hello, How can I move just the folders that contains files modified n days ago? Source tree: |-- SourceFolder | |-- Subfolder1 | | |-- file1.dat | | `-- file2.dat | |-- Subfolder2 | | |-- filea.dat | | `-- fileb.dat Destination tree: |-- ... (3 Replies)
Discussion started by: xavix
3 Replies

3. Shell Programming and Scripting

Move files to Folders

Hi Friends, Below is my requirement and i am not clear how to approach this issue in unix programming. I have a folder with 2500 files. The files are in below format. 1234_name1.txt 1234_name123.txt 4567_name1.txt 4567_name123.txt and i need a program which will read each file from this... (5 Replies)
Discussion started by: diva_thilak
5 Replies

4. Shell Programming and Scripting

Shell script to arrange files into several folders

Hello this is the script Im working on I have a picture collection that I rescued from a hard drive and there are thousands of pictures saved in one folder. What I need is to create several folders and put lets say around 200 pictures in each folder. At the end instead of having one huge... (8 Replies)
Discussion started by: kizofilax
8 Replies

5. Shell Programming and Scripting

Help with auto-detect new files/folders then zip and move script

Hello, I need a simple script to Auto-detect new files and folders in the directory. And then I need to zip the new files and bzip2 new folders and move them out of that folder where I am detecting changes to the other folder. Remember, I need simple one. If anyone could do it fast, I may... (1 Reply)
Discussion started by: juzt1s
1 Replies

6. Shell Programming and Scripting

Move all files but not folders to a new folder

Hi, I have a sub directory with a number of files and folders. What i want is a subdirectory with just folders and not files for cleanliness sake. So I want to move the files into the new folder but keep the folders in the same place. Move all files (but not folders) to new folder. I am... (4 Replies)
Discussion started by: Hopper_no1
4 Replies

7. Solaris

Move files into different folders based on its month

Hi All, I want to move the files in to different folders based on the files month in the file timestamp. For example All the september files in the directory should moves into the folder "sep_bkp_files" , August files in to aug_bkp_files folder... Please help me to achive the above... (10 Replies)
Discussion started by: velava
10 Replies

8. Shell Programming and Scripting

Script to move files in multiple folders

Hello all, I would appreciate any help to write a script. I have folder A which contains over 30 thousands xml files, I would like create multiple folders and move those files (500 in each folders). Thank you (1 Reply)
Discussion started by: mmsiddig
1 Replies

9. Shell Programming and Scripting

Move only folders and skipping files

How do I move all folders and its contents from a directory A to another directory B, skipping all files in Directory A ? ---------- Post updated at 12:53 PM ---------- Previous update was at 12:42 PM ---------- Ok. Got it. mv /A/*/ /B/ (1 Reply)
Discussion started by: DHeisenberg
1 Replies
FS_EXPORTAFS(1) 					       AFS Command Reference						   FS_EXPORTAFS(1)

NAME
fs_exportafs - Configures export of AFS to clients of other file systems SYNOPSIS
fs exportafs -type <exporter name> [-start <start/stop translator (on | off)>] [-convert <convert from afs to unix mode (on | off)>] [-uidcheck <run on strict 'uid check' mode (on | off)>] [-submounts <allow nfs mounts to subdirs of /afs/.. (on | off)>] [-help] fs exp -t <exporter name> [-st <start/stop translator (on | off)>] [-c <convert from afs to unix mode (on | off)>] [-u <run on strict 'uid check' mode (on | off)>] [-su <allow nfs mounts to subdirs of /afs/.. (on | off)>] [-h] DESCRIPTION
The fs exportafs command sets (if the -start argument is provided) or reports (if it is omitted) whether the machine can reexport the AFS filespace to clients of a non-AFS file system. To control certain features of the translation protocol, use the following arguments: o To control whether the UNIX group and other mode bits on an AFS file or directory are set to match the owner mode bits when it is exported to the non-AFS file system, use the -convert argument. o To control whether tokens can be placed in a credential structure identified by a UID that differs from the local UID of the entity that is placing the tokens in the structure, use the -uidcheck argument. The most common use is to control whether issuers of the knfs command can specify a value for its -id argument that does not match their local UID on the NFS/AFS translator machine. o To control whether users can create mounts in the non-AFS filespace to an AFS directory other than /afs, use the -submounts argument. OPTIONS
-type <exporter name> Names the alternate file system to which to reexport the AFS filespace. The only acceptable value is "nfs", in lowercase letters only. -start on =item -start off Enables the local machine to reexport the AFS filespace if the value is "on", or disables it if the value is "off". Omit this argument to report the current setting for all of the configurable parameters. -convert on =item -convert off Controls the setting of the UNIX group and other mode bits on AFS files and directories exported to the non-AFS file system. If the value is "on", they are set to match the owner mode bits. If the value is "off", the bits are not changed. If this argument is omitted, the default value is "on". -uidcheck on =item -uidcheck off Controls whether tokens can be placed in a credential structure identified by a UID that differs from the local UID of the entity that is placing the tokens in the structure. o If the value is on, the UID that identifies the credential structure must match the local UID. With respect to the knfs command, this value means that the value of -id argument must match the issuer's local UID on the translator machine. In practice, this setting makes it pointless to include the -id argument to the knfs command, because the only acceptable value (the issuer's local UID) is already used when the -id argument is omitted. Enabling UID checking also makes it impossible to issue the klog and pagsh commands on a client machine of the non-AFS file system even though it is a system type supported by AFS. For an explanation, see klog(1). o If the value is off (the default), tokens can be assigned to a local UID in the non-AFS file system that does not match the local UID of the entity assigning the tokens. With respect to the knfs command, it means that the issuer can use the -id argument to assign tokens to a local UID on the NFS client machine that does not match his or her local UID on the translator machine. (An example is assigning tokens to the MFS client machine's local superuser "root".) This setting allows more than one issuer of the knfs command to make tokens available to the same user on the NFS client machine. Each time a different user issues the knfs command with the same value for the -id argument, that user's tokens overwrite the existing ones. This can result in unpredictable access for the user on the NFS client machine. -submounts on =item -submounts off Controls whether a user of the non-AFS filesystem can mount any directory in the AFS filespace other than the top-level /afs directory. If the value is "on", such submounts are allowed. If the value is "off", only mounts of the /afs directory are allowed. If this argument is omitted, the default value is "off". -help Prints the online help for this command. All other valid options are ignored. OUTPUT
If the machine is not even configured as a server of the non-AFS file system, the following message appears: Sorry, the <file_system>-exporter type is currently not supported on this AFS client If the machine is configured as a server of the non-AFS file system but is not currently enabled to reexport AFS to it (because the -start argument to this command is not set to "on"), the message is as follows: '<file_system>' translator is disabled If the machine is enabled to reexport AFS, the following message precedes messages that report the settings of the other parameters. '<file_system>' translator is enabled with the following options: The following messages indicate that the -convert argument is set to "on" or "off" respectively: Running in convert owner mode bits to world/other mode Running in strict unix mode The following messages indicate that the -uidcheck argument is set to "on" or "off" respectively: Running in strict 'passwd sync' mode Running in no 'passwd sync' mode The following messages indicate that the -submounts argument is set to "on" or "off" respectively: Allow mounts of /afs/.. subdirs Only mounts to /afs allowed EXAMPLES
The following example shows that the local machine can export AFS to NFS client machines. % fs exportafs nfs 'nfs' translator is enabled with the following options: Running in convert owner mode bits to world/other mode Running in no 'passwd sync' mode Only mounts to /afs allowed The following example enables the machine as an NFS server and converts the UNIX group and other mode bits on exported AFS directories and files to match the UNIX owner mode bits. % fs exportafs -type nfs -start on -convert on The following example disables the machine from reexporting AFS to NFS client machines: % fs exportafs -type nfs -start off PRIVILEGE REQUIRED
The issuer must be logged in as the local superuser root. SEE ALSO
klog(1), knfs(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 FS_EXPORTAFS(1)
All times are GMT -4. The time now is 10:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy