Sponsored Content
Top Forums Shell Programming and Scripting Shell scripting for moving folder specific files into target directory of that country folder. Post 303002371 by rbatte1 on Wednesday 23rd of August 2017 07:51:53 AM
Old 08-23-2017
Can you show us:-
  • The output from uname -a in CODE tags (highlight the output and click the tool/button with co over de)
  • The output from ps -f to show which shell you are using
  • What you have tried
  • What errors you get

Can I assume that the directories should all be fully qualified? (with a leading /) What you have shown is one fully qualified and two from the current directory, wherever your shell might be.



Robin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Moving Files from one folder to another folder

Hi, I have a folder which contain the log files. The folder may contain sub folders as well. I want to move the contents of the log folder to tmp folder periodically. I have used the command. LOG_DIR=/logs DESTINATION_DIR=/tmp/logs find ${LOG_DIR} -mtime +1 -exec mv {}... (10 Replies)
Discussion started by: farooqpervaiz
10 Replies

2. Shell Programming and Scripting

Script for moving files from one folder to other

Hi All I need a shell script for move the 1 year old files from one folder to another folder with date and time. How to write a shell script for the same pls hepl me out. thanx in advance Thanx Lalit (2 Replies)
Discussion started by: lalitkumar
2 Replies

3. Shell Programming and Scripting

Script for moving files from one folder to other

Hi I need to move last 1 year old files from one folder to another location on same server.How to write a shell script for the same? thanx Lalit (8 Replies)
Discussion started by: lalitkumar
8 Replies

4. UNIX for Advanced & Expert Users

Moving 1000s of files to another folder

Hi, I need to move 1000s of files from one folder to another. Actually there are 100K+ files. Source dir : source1 Target dir : target1 Now if try cp or mv commands I am getting an error message : Argument List too long. I tried to do it by the time the files are created in the... (1 Reply)
Discussion started by: unx100
1 Replies

5. Shell Programming and Scripting

rsync delete specific files - from different target folder

Hi, I need to use rsync to delete multiple files(only specified files not all) using --delete option, these files are located in different target folders. Instead of running rsync command multiple times for each file, can we achieve this with one time execution? your help is much... (0 Replies)
Discussion started by: MVEERA
0 Replies

6. UNIX for Dummies Questions & Answers

Moving files to a folder with a variable name

hello there- first post here- maybe someone can help- Basically I am trying to copy the contents of a folder to a different folder that has a variable name. the content I want to copy would be in a folder on my desktop called: myfolder the variable folder would look something like: ... (3 Replies)
Discussion started by: infothelonghaul
3 Replies

7. Ubuntu

Shell Scripting , Moving Old file to specific folder

There are files stored like 14.Aug.2014.log, 15.Aug.2014.log etc. in a folder $HOME/logyou need to find out all the log files of last 1 month and move them into $HOME/logs/lastmonth/ this should be implemented with reference of file name. ---------- Post updated at 12:30 PM ----------... (3 Replies)
Discussion started by: shajoftaj
3 Replies

8. Homework & Coursework Questions

Shell Scripting , Moving Old file to specific folder

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: There are files stored like 14.Aug.2014.log, 15.Aug.2014.log etc. in a folder $HOME/log you need to find out all... (4 Replies)
Discussion started by: shajoftaj
4 Replies

9. Shell Programming and Scripting

Shell script which will check the target file and folder exists and copy it

Hi All, I am a beginner in this and trying to write a shell script in linux which will : 1. Ask for a file name and check if its exists. 2. If file exists only then it will ask for the new target folder, after entering target folder name it will check if it exists. 3. If target folder... (3 Replies)
Discussion started by: ashish_neekhra
3 Replies

10. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
packingrules(4) 					     Kernel Interfaces Manual						   packingrules(4)

NAME
packingrules - packing rules file for cachefs DESCRIPTION
is a packing rules file for packingrules contains a list of directories and files that are to be packed. It also contains a list of direc- tories and files that are to be specifically excluded from packing. See cachefspack(1M). Many users choose to manually create the packing rules file and edit it by hand. Users can edit the packingrules (using any editor) to permanently change the packingrules file, or to gain access to more powerful options that are not available from the command line (such as the command). It is much easier to enter complex wildcard expressions by editing the packingrules file. Following is a description of the lines in a packing rules file. Blank lines and lines that begin with a pound sign are ignored. Lines can be continued by placing a backslash () immediately before the newline character. All other lines in the packingrules file have one of the following formats: This line identifies a directory (or pair of directories) under which files should be packed. At least one directory name must be specified. The arguments must be fully qualified path names and may include environment variables. This line enumerates a list of files and subdirectories beneath the current directory to be packed. This specification is recursive. That is, specifying the name of a directory automatically includes all files and subdirectories it contains. This line enumerates a list of files that are not to be packed. Regular expressions are permitted. There are important differences between the arguments to the and the statements. The arguments to statements can contain slashes and are interpreted as file names relative to the directories. The arguments to statements are simpler names or expressions that cannot contain slashes. An statement will not override a LIST statement. statements only exclude files that are found beneath listed directories. If the first name argument to a or an statement begins with an exclamation point the remainder of the statement will be executed as a com- mand that will be run in the current directory. The output of the command will be treated as a list of newline separated file names to be packed command) or to be excluded from the packing list command). For the command, the resulting file names will be interpreted relative to the enclosing directory. Blanks can be embedded in an argument by escaping them with a backslash () or enclosing the argument in double quotes (` " '). Double quotes can be passed in arguments by escaping the double quotes with a backslash (). lines only apply to the statement that precedes them. lines can appear before any statement (in which case they apply to all or after a statement (in which case they only apply to the that precedes them). Any number of these statements can occur in any combinations. The order is not important. EXAMPLES
The use of these statements is illustrated in the following packing rules file. # # Ignore junk files. # IGNORE core *.o *.bak *% # # Pack everything in the work subdirectory and in a few # favorite mailboxes. # BASE /net/bigserver/export/home/myname LIST work LIST m/incoming LIST m/action LIST m/pending # # Pack two important project directories but skip # all postscript output. # BASE /net/bigserver/export/projects $HOME/projects LIST poindexter epiphany IGNORE *.ps # # Pack the foonly package. # BASE /net/bigserver/opt/foonly /opt/foonly LIST !cat .packinglist # # Also pack the latest executables for the standard # build environment. # BASE /net/bigserver/export/buildenv $HOME/buildenv LIST !find . -type f -a -perm -111 -a -print AUTHOR
was developed by Sun Microsystems, Inc. SEE ALSO
cachefspack(1M). packingrules(4)
All times are GMT -4. The time now is 11:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy