Ubuntu :: Script To Recursively Make Folder & Filenames Lowercase
Jul 23, 2010
I'm looking for a shell script that will recursively make all of the file and directory names in a large directory tree lowercase. It has to work with file and folder names with spaces and keep the spaces in the converted names. The reason I want to do this is because most of my personal files are on my Windows partition, and before I discovered Ubuntu, I made my file and folder names have mixed case as in "My File.txt", and now I want it to look like "my file.txt".
View 7 Replies
ADVERTISEMENT
Sep 2, 2010
I was wondering if anyone knows how to change the timestamps of folders recursively based on the latest timestamp found of the files in that folder.
So for example:
Code:
jon@UbuntuPanther:/media/media/MP3s/Foo Fighters/(1997-05-20) The Colour and The Shape$ ls -alF
total 55220
drwxr-xr-x 2 jon jon 4096 2010-08-30 12:34 ./
[Code]....
View 1 Replies
View Related
Apr 1, 2010
I work on two hosts, [1] with online ftp access, and [2] without ncftp installed, but with ssh access.
Now I need to recursively upload a folder from [2] to [1]. So I can't use hardfeed - which is for downloading
I think I can use a
find ./orig -exec curl ftp://pinshosting.net
But I'm not so so known with the params of find and curl to get it working recursively.
View 4 Replies
View Related
Mar 26, 2011
I'm trying to rename files recursively from a folder. I want to delete the & from every filename. i've searched the net and found the following script:
Code:
#!/bin/bash
dir=/whatever/directory
for file in `ls $dir` ; do
# ANYCASE TO UPPERCASE:
newname=`echo $file | tr '[a-z]' '[A-Z]'`
mv $dir/$file $dir/$newname
done
and changed it:
Code:
#!/bin/bash
dir=/home/test
for file in `find $dir -type f` ; do
#rename files containing &
newname=`echo $file` | tr '[&]' ''
mv $dir/$file $dir/$newname
done
But the for loop explodes the filename after each & sign, so i don't have a whole filename. if the file is named lorem & ipsum, the for loop will break it in 3 parts.
View 2 Replies
View Related
Dec 1, 2009
I got a filename called like this:
beach---------20090808-110000.ogg
beach---------20090808-120000.ogg
It's like this:
name----------YYYYMMDD-hhmmss.ogg
Now Im splitting these hourly files into 1 minute files. I get then this output sofar properly:
beach---------20090808-110000_00.mp3
beach---------20090808-110000_01.mp3
beach---------20090808-110000_02.mp3
and so on....
the 00, 01, 02 and up are the minutes it has splitted it. Now I need a script, after it did this, to rename the file names into this:
beach---------20090808-110000.mp3
beach---------20090808-110100.mp3
beach---------20090808-110200.mp3
beach---------20090808-110300.mp3
View 4 Replies
View Related
Sep 26, 2010
I need to strip the executable flag from all files within a certain directory and sub directories. Right now I'm doing it with a 2 step process
find /dir/ -type f -exec chmod ugo-x {} ;
find /dir/ -type d -exec chmod ugo+rx {} ;
Is it possible to modify the first line so that I can strip exec flag from all non-directory files? Since this needs to be done on a fairly regular basis across a lot of directories and files, I'd prefer not to use a bash script which would slow it down.
View 1 Replies
View Related
Jan 29, 2011
I have a bunch of files on a Ubuntu box, which have various characters in their filenames that Windows doesn't accept (mostly ":" and "*", but possibly others).What's the simplest way to get these all renamed and moved to a Windows machine? It's OK to replace these characters with something like "[colon]" and "[asterisk]".
View 1 Replies
View Related
Aug 31, 2010
I am attempting to make a shared folder for people that VPN into the network. This folder needs to be accessible to windows and mac machines. So far I have the VPN through ppptd working. I just don't know how to make a folder. I feel like this should be fairly easy. I am using Lucid Lynx server edition.
View 1 Replies
View Related
Sep 21, 2010
My Linux username is "virchanza" and my group is "virchanza".How do I make a publicly-accessible folder within my private home folder?
View 3 Replies
View Related
Mar 28, 2011
I been using linux for a while, but I havent had the time to really learn it. Something Id like to get more familiar with is bash so here is a simple example of something I would like to do:
I have a directory full of files. For each file in the directory create a new subdirectory with each files name.
I tried this:
#im already in this directory
aaa=./*
for a in $aaa
do mkdir $a
done
One of the problems is that there are spaces () and - in the filenames so I get many subfolders with names like "-" which i don't want.
I tried stuff like:
aaa=./*
for a in $aaa
do mkdir "'"$a"'"
done
This of course also did not work.
Additional I tried just creating a folder with the name of one of the files and I got this:
mkdir: cannot create directory `(audio) - R56339.EXE': File exists
Well yeah a file exsists with that name, but I want to create a folder- why is there a conflict?
Just to be clear here are the contents of this folder:
~/Desktop/LAB/Media/Drivers - (Image Deployment)/Optiplex_GX260/XP> ls
(audio) - R56339.EXE (NIC-Onboard-Intel) - R54402.EXE
(Modem-datafax-V92) - R54403.EXE OEM_Applications
[Code].....
View 1 Replies
View Related
Feb 4, 2011
A few minutes ago, without any apparent reason, my gnome-terminal started refusing acceptance of lowercase 'L'. When I hit the 'L' key, the menu toggles between visible and hidden. Note, this is lower case 'L', not uppercase.
View 1 Replies
View Related
Aug 26, 2011
What is the general feeling for the case of hostnames in Linux/UNIX, is it preferable to have them in lower-case or upper-case? I have always preferred them as lower-case but I am interested to see if there are any arguments for or against this practice.
View 1 Replies
View Related
Feb 20, 2010
For some reason, just shortly ago, the terminals, konsole, etc. will not accept the lowercase letter 'e' as input for some reason, not even when pasting, e.g.
a paste of file:///usr/share/applications/kde4/konsole.desktop
becomes fil:///usr/shar/applications/kd4/konsol.dsktop
on the command line. Weird.
For everything else I have tried at this point on the computer, the lowercase letter 'e' is just fine (this message being an example);Has some configuration file for terminals (konsole, xterm, Yakuake) or whatever got messed up and I need to correct it?
View 9 Replies
View Related
Oct 7, 2010
I have quite a strange issue with (supposedly) my keyboard mappings.
while using GNOME session:
lowercase 'v' is not working as it should - no keypress is reaching apps; while I'm holding V key depressed, gnome-terminal console shows a hollow cursor (just like when input focus is in some other window) and nothing is printed; uppercase 'V' is working just fine (that is Shift+V); if I press AltGr + V, a lowercase 'v' is printed; if I'm typing quickly, sometimes pressing V key to get a lowercase 'v' is not just being ignored, but also the next symbol typed is swallowed and not printed out; this issue is present for the USA keyboard layout, as well as for the Russian keyboard layout.
while using TTY console (Alt+Ctrl+F1, etc):
everything works as it should (i.e. lowercase ' is printed whenever I press it);
no problems with the physical keyboard.
I haven't done any editing of any gnome/X configs and/or keyboard mappings.
This is my Ubuntu 10.04 Linux version:
$ uname -a
Linux hostname 2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:05:27 UTC 2010 x86_64 GNU/Linux
Update - stty output:
$ stty -a
speed 38400 baud; rows 43; columns 151; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = M-^?; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
[Code]....
View 2 Replies
View Related
Jun 14, 2010
I have a file partially like this
209 c 89
215 a 76
603 B 190
626 f 240
I want to separate this file into two sub-files based on the lowercase and uppercase of column 2 so that the sub-files are like
file1
209 c 89
215 a 76
626 f 240
file2
603 B 190
View 4 Replies
View Related
Jan 6, 2011
I would love to see if there is a way in linux that if I have forgotten the command name and would like the search the entire root using "find" command but I am not sure of the case sensative of the command name (eg. VBoxManager or vboxmanager). So how can I search the root with everything treated as lowercase first? or is there a regular expression to search?
View 4 Replies
View Related
May 4, 2011
just wondering, if i type in a url like this:
how can i get it to direct to:
View 1 Replies
View Related
Nov 26, 2010
Kernel 2.6.21.5, Slackware 12.0
As a result of having mixed files from different filesystems, I have, in directory foo/, files with filenames in uppercase and files with filenames in lowercase. If I want to convert them to all uppercase how do I do it? Consider this will be later recorded into optical discs.
View 7 Replies
View Related
May 12, 2010
I have users logging via ssh, how to make the user to cannot go out of his account folder?Reason:user should not look into other user folders?
View 2 Replies
View Related
Sep 21, 2010
I'm trying to convert all file extensions for files in many sub-directories from uppercase to lowercase. I have two problems, how to list the absolute path to the files recursively over many sub-directories for which I so far have this:-
Code:
find ~/Photos -print which would be fine, except it gives the directories on their own when it finds them rather than just the files with absolute paths. I couldn't find a switch for the "ls" command to do this, so I had to improvise with "find". and once I get grab each absolute file name, to just change the file extension rather than the entire file, which is what I have at the moment.
[Code]..
View 7 Replies
View Related
Jul 27, 2011
Is it possible to force Thunar (in xfce4) to use all lowercase for the special directories it manages: Desktop, Trash, and "File System"?
View 2 Replies
View Related
Mar 26, 2011
shell script to convert file names from UPPERCASE to lowercase file names or vice versa in linux
View 6 Replies
View Related
Jan 24, 2010
I've made some of my own icons in Gimp and saved them as .pngs. The problem is, when I use them they always appear smaller than the system default icons. Is there no way to make them as the same size as the system icons? I read somewhere that GNOME (which is what I use) uses .png .svg and .xpm. I am only able to save as .png with GIMP, is there a way to get .svg and .xpm extension capabilities with GIMP?
These are the icons (only two):
1. HJ-Split Folder
2. Blood Frontier Folder
Is there maybe a specific way to make folder icons that I am not following? Using Ubuntu 9.10, Desktop edition.
View 5 Replies
View Related
Jun 2, 2010
I need to make a few folders, but I need the fold name to reflect the time which they were created. For example: if I create a folder at on 2010.06.03 at 13:01:34 then I would need a file name something similar to the following 20100603_130134. In addition, could the same method be used for .tar files? I would like a bash script which I can run to perform the following; however, I am not familiar with scripting in Linux yet.
View 2 Replies
View Related
Jan 6, 2011
I used DVD::RIP to make an AVI out of a VIDEO_TS folder, however it compressed it from 4gb to 1gb and the quality is uh.. kind of bad. How can I make an AVI out of a VIDEO_TS "video folder" without losing much quality? Size of the file doesn't matter.
View 1 Replies
View Related
Feb 14, 2011
I have a WebDAV server at home with at folder that I want to mount on my Ubuntu computer at work over the Internet. Everything works fine if I just use dav://user@server:port in Nautilus so I tried adding it to fstab (using davfs2) and managed to get it to mount fine.
The problem is that when mounted using fstab Nautilus thinks that it is a lokal folder and downloads images and movies to create thumbnails/previews, something that it doesn't do when just using dav://. This uses a lot of bandwith everytime I'm trying to access a folder with any media. I'm wondering if there is any way to exclude my entire /media/nas folder from showing thumbnails?
View 2 Replies
View Related
May 22, 2011
Im a Total begginer when it comes to Ubuntu , and i was wondering if i can make a hidden folder or a password locked folder / How To If So
View 3 Replies
View Related
Mar 1, 2011
i cant seem to find how to do it. For the Keyboard shortcuts, i want to make a shortcut that opens my download folder. I can add custom commands, but in the command line what do i put to open the folder?
View 3 Replies
View Related
Jun 27, 2011
Code:
cat /etc/group | grep www-data | grep chad
chad:x:1000:www-data
the user www-data should have read access to my folder but i am still getting a 403 forbidden error i have done this before without issue anyone see what is wrong? i have a folder i use for file transfers over IM it is more reliable than the messengers file transfer abilities
View 5 Replies
View Related
Dec 10, 2010
i have been running windows from ME through to Windows 7 over the years. and i must admit that because of all the flaws with the earlier versions and those wonderful little viruses that seem to show up even though your teenagers swear they didn't do anything ,have made me somewhat skilled at formatting and reinstalling the OS to the point where i have done it for several other ppl to help them out. I rather enjoy doing it actually.
and i have been a big fan of lets just call it "open source" windows software. now this ubuntu thing seems to have taken some of the fun away..
i ran the cd version of 10.10 and really liked what i saw so i installed it alongside my windows 7. naturally as luck would have it something went astray and i can no longer boot to win7. not a big deal. i was going to format and reinstall anyways. ha ha.
i have been reading through the forum learning what i can but now my question
i still have a machine running windows on my home network.
what i would like to do is make a shortcut to a folder on it from my ubuntu desktop. i do have full access to the machine and the folder , i would just like a shortcut .
View 8 Replies
View Related