Differences between version 26 and previous revision of BashOneLiners.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 26 | Last edited on Tuesday, April 1, 2008 11:24:51 am | by DanielLawson | Revert |
Older page: | version 25 | Last edited on Tuesday, April 1, 2008 11:23:36 am | by DanielLawson | Revert |
@@ -105,11 +105,11 @@
----
!!! Rename a series of files using a regular expressions
-There's a number of ways of doing this, all with various problems. I finally settled on the following (Thanks [#wlug], and Isomer and Phil in particular:
+There's a number of ways of doing this, all with various problems. I finally settled on the following (Thanks [#wlug], and Isomer and Phil in particular)
:
<verbatim>
find . -iname '*:*' -exec rename s/:/-/ '{}' ';'
</verbatim>
-This was needed in particular because the filenames had double spaces in them and trailing spaces, which ultimately defeated my rather rusty attempts at using bash. I'm replacing ':' with '-' because Macs allow you to create a file or a directory with a '/' in the name, but represent this on the filesystem as a ':'. This causes problems over CIFS shares however.
+This was needed in particular because the filenames had double spaces in them and trailing spaces, which ultimately defeated my rather rusty attempts at using bash. I'm replacing ':' with '-' because Macs allow you to create a file or a directory with a '/' in the name, but represent this on the filesystem as a ':'. This causes problems over CIFS shares however. -DanielLawson