Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 12-09-2011, 10:01 AM   #1
LQ Newbie
Registered: Oct 2011
Posts: 20

Rep: Reputation: Disabled
Post directories and file arrangement in bash

In the directory are files of various types, i want to arrange the files on individual directories under their type. There are three distinct types of files: 1) Text documents - files with extensions. Doc,. Txt,. Pdf, ... 2) multimedia files - with the extensions. Mpg,. Avi,. Mp3 ... 3) graphics files - with the extensions. Jpg,. Gif,. Png ... 4) All other files Files types 1-3 to move into individual directories and files of other types have to move in directories with names corresponding to the extension (you can bring them to uppercase - BAK, CPP ,...). i want the script to run with the following parameters: 1)-m path - if specified, the multimedia files will be moved to the directory PATH 2)-d PATH - specifies the path where you have to move your documents 3)-l indicates that when the file names should lead to lower case 4)-x indicates that they move to lower case file extension any ideas ??i am a newbie and im trying to learn bash scripting so i thought of this question
Old 12-09-2011, 10:09 AM   #2
Senior Member
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Sounds like you have your homework to do.

Post what have you done and where the specific trouble is .
At this forum members are volunteering their time and not really doing homework for others (exceptions exist :-)

so... good luck for now


bash, bash scripting, linux, unix

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Little bash script and file to give long (or any) directories short names WardXmodem Programming 1 11-23-2009 01:24 AM
bash script to insert id3 tags from file and directories jason7 Linux - General 15 07-20-2009 06:10 AM
How to search all directories for a file in bash overlook1977 Linux - Newbie 7 04-10-2007 08:00 AM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 01:23 PM
Is arrangement of file systems will differ if we copy a file from FAT 32 to ext 3 ? anindyanuri Linux - Software 2 02-20-2005 12:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:39 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration