Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i'm a new user here and although i'm maybe not a real newbie, i didn't know which other of the forums to use, Software just didnt feel right.
Anyhow. I have files with identical names, eg "TheSong.mp3", spread out over dirs with similar names, eg "Folder01", "Folder02", "Folder03" etc.
Now i want to move all these files into the same folder, but in order to avoid too much fighting i figured i'd give them unique names.
My question concerns this renaming. Just by heart i thought maybe the parent folder, or should i say, the folder that the file resides in, could be a good name to add to the current filename. The result would be something like "Folder01_TheSong.mp3", "Folder02_TheSong.mp3", etc
I have this vague idea that i could position myself in root (just above the Folder0x) and use find to find the files, and then sortof pipe them through... well... xargs or something. Well not really piping. But if i remember correctly, xargs is used to do things on found files. Or, i could go a bit fancier perhaps and make some kind of for-loops that checks into each folder and does the dirty work. In any case, i'm gonna need some sort of reference to the folder-name. is there a variable such as $pwd that could be used?
All ideas are appreciated....
(.... but if you're gonna answer "RTFM" or "go to tldp.org" or something like that, please just ignore this post mmmmkay?)
Oh by the way, the folders are empty except for these files, one file in each folder.