Tagged Questions
1
vote
3answers
39 views
Renaming only part of a file using CLI [duplicate]
I realise this might be quite a simple question, but I'm still quite new to the command line and only have a grasp of basic commands.
I've downloaded some lecture presentations (~25 or so) from my ...
1
vote
2answers
42 views
How to strip directory structure with command line (or script)
I have a large collection of files packed into a two-level directory structure with many, many, many folders.
In other words, I have a folder with a great many subfolders in it. There are no ...
1
vote
1answer
29 views
Can one move a relpath in one command?
This question is similar to one I asked recently, but the answers to that question, for the most part, do not extend to this one, AFAICT. The main difference between the two questions is that the ...
3
votes
2answers
386 views
How do I get this find and rename command to work with subdirectories? [duplicate]
Possible Duplicate:
Recursive rename files and directories
I have a large directory of music files that is often changing as files and directories come and go. My preference is to make sure ...
7
votes
1answer
1k views
Best way to continue stopped move (mv) by merging directories?
I have moved (mv) a pretty large directory on my NAS (Linux based), but had to interrupt the procedure. Not being a regular Linux user, I though I could just continue and merge the rest later in.
mv ...
1
vote
2answers
1k views
Batch copying/moving files in unix?
Is there a way to batch copy/move files in unix? I thought it might be an option for cp/mv but I can't find any way to do it.
2
votes
3answers
458 views
Removing apostrophe from all file names
I tried to remove apostrophe from all files' names in the directory.
for i in *; do mv $i `echo $i | tr -d "'"`; done
After executing this command nothing is renamed.
Do you know what's wrong ...
3
votes
3answers
257 views
Unique file name for different files
I'm working with graphic design. I've downloaded many files (EPS files, PSD files, etc) from various websites.
Because it come from various websites, after downloaded from more than 10 different ...
8
votes
3answers
1k views
How can I use ms-dos style wildcards with ls and mv?
I have the misfortune of coming from a MS-DOS background - but at least it makes me appreciate how much more powerful Linux is. I've been working on getting my Linux-Fu up to par, but there are a ...
3
votes
2answers
226 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 ...
8
votes
2answers
672 views
mv a file without breaking a symlink to that file
Is it possible to mv a file w/out breaking a symbolic link to that file?
My initial response to this is no, and I'm working out a script based solution to change the links immediately following the ...
3
votes
1answer
249 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 ...
14
votes
4answers
22k views
How to overwrite target files with mv?
I have a ton of files and dirs in a subdirectory I want to move to the parent directory. There are already some files and dirs in the target directory which need to be overwritten. Files that are only ...
2
votes
3answers
467 views
Selective recursive move?
Is there a command like
mv --preserve-structure src src/1 src/2/3 dst
which creates dst/1 and dst/2/3? It should work similar to mv src/* dst, but move only the subtrees listed.
8
votes
3answers
474 views
Lowercasing all directories under a directory
I want to lowercase every directories' name under a directory. With which commands can I do that?
8
votes
7answers
4k views
How do you bulk move files up one directory safely?
How can I move files up a directory where there might be hundreds or thousands of files in the directory, and you might not be sure about whether there are dupes in ... What method would you use?
How ...
21
votes
5answers
6k views
How can I move files and view the progress (e.g. with a progress bar)?
When moving large directories using mv, is there a way to view the progress (%)?
The cp command on gentoo had a -g switch that showed the progress.
4
votes
1answer
2k views
Command-line mv exclusion list
Is there a way to mv,cp, or any file operation such that I could specify all the files I don't want affected?
For example, say I have a folder with the files file1, file2, and file3, and I want to ...
6
votes
3answers
4k views
How can I move files by type recursively from a directory and its sub-directories to another directory?
What would be a good way to move a file type from a directory and all of its sub-directories?
Like "move all *.ogg in /thisdir recursively to /somedir". I tried a couple of things; my best effort was ...