Tagged Questions
1
vote
2answers
79 views
renaming a directory and its subdirs without affecting their files
I have to rename directories under the root directory with prefix "ms_PF" and then rename their subdirectories with the modified name of the main directory with an extra "_", and then copy all ...
2
votes
1answer
319 views
Create sub-directories and organize files by date
I have some directories of files copied from my security camera that I would like to organize into sub-directories by file date. So for example;
-rwxrwxrwx 0 root root 4935241 Jul 19 2012 ...
1
vote
2answers
124 views
How to “grab” matching files from a lookup file in bash?
I have a lookup file containing filenames. I also have a directory containing files, some of which have the names that correspond to some of the names in the directory.
How can I:
Move exact ...
3
votes
3answers
628 views
Preserve directory structure when moving files using find
I have created the following script that move old days files as defined from source directory to destination directory. It is working perfectly.
#!/bin/bash
echo "Enter Your Source Directory"
read ...
1
vote
1answer
261 views
How to move files with same name and concatenate
My directory structure is given below. I need to move all the folders from Test3 to Test2 and concatenate the files with same names
[jg@hpc Test2]$ tree
.
|-- Sample_1008
| |-- ...
0
votes
2answers
418 views
batch rename a few files [duplicate]
Possible Duplicate:
Batch renaming files
I have some files that I wish to rename in a single command. The files are names thus. I want the E S Posthumus bit removed from the names and also ...
3
votes
2answers
239 views
rename randomly files on a USB device
I would like to rename all of my files of my USB device randomly. Indeed, in my car, my tuner has not the random function.
I think I can do it with PHP ... but I'm pretty sure it is possible to do ...
1
vote
1answer
1k views
Move huge number of files into date structured directory order
I have about 1 million files in this directory: /home/username/images/
Each of the files are called something like: 012345678910(Place)_0_20120414185957_28841.jpg with the timestamp part of the ...
2
votes
2answers
892 views
UNIX move file name with sysdate
I want to make a script in Unix in which I have to move a file daily to a specific path.
In order to avoid overlapping of the file, I want the file name along with the date.
e.g. mv filename ...
1
vote
0answers
179 views
Can I get the backup option of cp and mv to work with directories?
--backup[=CONTROL]
make a backup of each existing destination file
The man page does say that it works on file. It doesn't seem to have any effect on directories. Is there anyway to make this ...
3
votes
2answers
354 views
Simple shell script needed to move database files
I am using MySQL on Ubuntu machine.
I need to physically move around the database files under /var/lib/mysql/ (this is where all the databases directories are located).
Say I have two databases, ...
3
votes
2answers
253 views
Move with possible rename
Is it possible to construct a command that will move the file to another directory and if the same file is already there, generate some random string that is not in the name of some file in the ...
3
votes
1answer
253 views
Multiple renaming files [duplicate]
Possible Duplicate:
How to clean up file extensions?
I'd like to rename files with extension .flac.mp3 to extension .mp3.
I used the following command
$ for i in *; do mv $i `echo $i | sed ...
7
votes
4answers
6k views
Copy/rename multiple files using regular expression (shell script)
I have a collection of files matching a pattern such as 'assignment02.cc', 'assignment02.h', 'assignment02.txt', etc. I would like to copy/rename these files into 'assignment03.cc', 'assignment03.h', ...