Sponsored Content
Top Forums Shell Programming and Scripting Move files from one directory to another in chunks Post 303002303 by itkamaraj on Tuesday 22nd of August 2017 12:42:52 AM
Old 08-22-2017
Hi, why dont you try in for loop. with some sleep time enabled. change the SOURCE_DIR and DESTINATION_DIR values according to your source and destination folder
Code:
#!/bin/bash
SOURCE_DIR="/tmp/source"
DESTINATION_DIR="/tmp/destination"

cd ${SOURCE_DIR}
for FileName in *
do
	echo "Moving the File : ${FileName}"
	mv ${FileName} ${DESTINATION_DIR}
	sleep 1
done

This User Gave Thanks to itkamaraj For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Move all files in a directory tree to a signal directory?

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)
Discussion started by: briandanielz
2 Replies

2. UNIX for Dummies Questions & Answers

How to move files between 2 dates from one directory to another

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)
Discussion started by: dsfreddie
14 Replies

3. UNIX for Dummies Questions & Answers

Zip all files in a directory and move to another directory

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)
Discussion started by: dssyadav
0 Replies

4. Shell Programming and Scripting

Process files in a directory and move them

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)
Discussion started by: andymay
1 Replies

5. UNIX for Dummies Questions & Answers

Rename files in a directory and move them

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)
Discussion started by: andymay
1 Replies

6. Shell Programming and Scripting

List files with date, create directory, move to the created directory

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)
Discussion started by: charli1
6 Replies

7. UNIX for Beginners Questions & Answers

Move all files one directory level up

I want to move all the files in a given directory up one level. For example: Dir1 Subdir1 I want to move all the files in Subdir1 up to Dir1 (then I want to ultimately delete Subdir1) Thanks, Ted (10 Replies)
Discussion started by: ftrobaugh
10 Replies

8. UNIX for Dummies Questions & Answers

How to move gz files from one source directory to destination directory?

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)
Discussion started by: venkat918
11 Replies

9. Shell Programming and Scripting

How Create new directory and move files to that directory.?

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
CGI::Session::Driver::file(3)				User Contributed Perl Documentation			     CGI::Session::Driver::file(3)

NAME
CGI::Session::Driver::file - Default CGI::Session driver SYNOPSIS
$s = new CGI::Session(); $s = new CGI::Session("driver:file", $sid); $s = new CGI::Session("driver:file", $sid, {Directory=>'/tmp'}); DESCRIPTION
When CGI::Session object is created without explicitly setting driver, file will be assumed. file - driver will store session data in plain files, where each session will be stored in a separate file. Naming conventions of session files are defined by $CGI::Session::Driver::file::FileName global variable. Default value of this variable is cgisess_%s, where %s will be replaced with respective session ID. Should you wish to set your own FileName template, do so before requesting for session object: use CGI::Session::Driver::file; # This line is mandatory. # Time passes... $CGI::Session::Driver::file::FileName = "%s.dat"; $s = new CGI::Session(); For backwards compatibility with 3.x, you can also use the variable name $CGI::Session::File::FileName, which will override the one above. DRIVER ARGUMENTS If you wish to specify a session directory, use the Directory option, which denotes location of the directory where session ids are to be kept. If Directory is not set, defaults to whatever File::Spec->tmpdir() returns. So all the three lines in the SYNOPSIS section of this manual produce the same result on a UNIX machine. If specified Directory does not exist, all necessary directory hierarchy will be created. By default, sessions are created with a umask of 0660. If you wish to change the umask for a session, pass a UMask option with an octal representation of the umask you would like for said session. NOTES
If your OS doesn't support flock, you should understand the risks of going without locking the session files. Since sessions tend to be used in environments where race conditions may occur due to concurrent access of files by different processes, locking tends to be seen as a good and very necessary thing. If you still want to use this driver but don't want flock, set $CGI::Session::Driver::file::NoFlock to 1 or pass "NoFlock => 1" and this driver will operate without locks. LICENSING
For support and licensing see CGI::Session perl v5.16.3 2008-07-16 CGI::Session::Driver::file(3)
All times are GMT -4. The time now is 10:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy