Need BASH Script Help to Move Files While Creating Directories
I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much faster than copying the file then deleting it. But I don't know how to get the path without the filename to pass to the mkdir -p command? How should I modify the script?
Last edited by Don Cragun; 12-10-2016 at 07:07 PM..
Reason: Add CODE tags.
I have a security system that FTPs the camera files to my machine, however I want to sort the pictures (taken every 30s) into directories by hour.
Every picture uses the following file format.
yymmddhhmmsstt.jpg (where tt is the milliseconds)
I am thinking the for loop is best
for file... (11 Replies)
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
I want to move the files in a dir to different dirs based on their file names.
Ex: i have 4 different files with name -
CTS_NONE_10476031_MRL_PFT20081215a.txt
CTS_NONE_10633009_MRL_PFT20091020a.txt
CTS_NONE_10345673_MRL_PFT20081215a.txt
CTS_NONE_10872456_MRL_PFT20091020a.txt
and the 1st... (4 Replies)
Hi,
I have various log files in different paths. e.g.
a/b/c/d/e/server.log
a/b/c/d/f/server.log
a/b/c/d/g/server.log
a/b/c/h/e/server.log
a/b/c/h/f/server.log
a/b/c/h/g/server.log
a/b/c/i/e/server.log
a/b/c/i/e/server.log
a/b/c/i/e/server.log
and above these have an archive folder... (6 Replies)
Hi,
I am new to shell-scripting, and doing a lot of reading. I am having some trouble getting started with a simple testing of scripting. I have been experimenting with if, loops, for, test, etc., but still unsure. I seem to have the hang of it when it comes to creating a single file or... (6 Replies)
I would like to transfer all files ending with .log from /tmp and to /tmp/archive (using find )
The directory structure looks like :-
/tmp
a.log
b.log
c.log
/abcd
d.log
e.log
When I tried the following command , it movies all the log files... (8 Replies)
Hi Team,
I have thousands of TIF files which are converted from PDF. Below is a sample of it.
LH9406_BLANCARAMOS_2012041812103210320001.tif
LH9406_BLANCARAMOS_2012041812103210320002.tif
LH9406_BLANCARAMOS_2012041812103210320003.tif
LH9411_ANGENIAHUTCHINSON_2012041812102510250001.tif... (9 Replies)
how can i move "dataName".sql.gz into a folder called 'database' and then move "$fileName".tar.gz * .htaccess into a folder called 'www' with the entire gzipped file being "$fileName".tar.gz? Is this doable or overly complex.
so
mydemo--2015-03-23-1500.tar.gz
> database
-... (5 Replies)
Hi,
In a parent directory there are several files in the form
IDENTIFIER1x
IDENTIFIER1.yyy
IDENTIFIER1_Z, etc
IDENTIFIER2x
IDENTIFIER2.yyy
IDENTIFIER2_Z, etc
IDENTIFIER3x
IDENTIFIER3.yyy,
IDENTIFIER3_Z, etcIn the same parent directory there are corresponding directories named... (7 Replies)
Hello,
I'm a first time poster looking for help in scripting a task in my daily routine. I am new in unix but i am attracted to its use as a mac user.
Bear with me...
I have several files (20) that I manually drag via the mouse into several named directories over a network. I've used rsync... (14 Replies)
Discussion started by: SonnyClark
14 Replies
LEARN ABOUT DEBIAN
pycocuma
pycocuma(1) Addressbook pycocuma(1)NAME
pycocuma - Pythonic Contact and Customer Management
SYNTAX
pycocuma [options] [connection-string]
DESCRIPTION
PyCoCuMa (Pythonic Contact and Customer Management) provides a personal information system for addresses, telephone numbers and other data
associated with personal contacts (also supports photographic pictures).
PyCoCuMa is purely written in Python with a Tk graphical interface. PyCoCuMa is based on an XML-RPC client-server architecture. The server
stores its data in compatible vCard (ver. 3.0) files (*.vcf) which can be read by all modern address programs (Evolution, KAddressbook,
Outlook, GnomeCard, etc).
This manpage documents the PyCoCuMa client (which can also run standalone).
OPTIONS
connection-string
addressbook filename / server url
-h --help
show help
-c --config
location of configuration file (default: ~/.pycocuma)
--noconf
do not save configuration / preferences
-t --type
connection type: xmlrpc or file (default: file)
--finder
open QuickFinder
--import
import from file/stdin (-) (e.g. vcard:/tmp/John.vcf)
--export
export to file or stdout (e.g. latex:-)
EXAMPLES
pycocuma --type=xmlrpc http://localhost:8810
pycocuma --config=/tmp/pycocumatest.conf --type=file ./addressbook.vcf
AUTHORS
PyCoCuMa was written by Henning Jacobs.
This manpage was written by Christoph Berg for the Debian GNU/Linux distribution (but may be used by others).
SEE ALSO
PyCoCuMa home page
http://www.srcco.de/pycocuma/
pycocuma-server(1)Debian 0.4.5-5 pycocuma(1)