Coloring directories and files under a terminal?

Hi everyone,
I know, and have the option running, that with the ls --color=auto i get colored files, but... i want to be able to colour my self the different type of files, (like brown for zip, tgz and such, blue for avi, mp3, ogg... see the idea?)
Does anyone have a clue on how to acomplish this?

On some systems you can just edit /etc/DIR_COLORS
Arch appears to use a binary program /bin/dircolors. Running that produces this output:
~)$ dircolors
LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:
bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:
*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:
*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:
*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:
*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:
*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:
*.ogg=01;35:*.mp3=01;35:*.wav=01;35:';
export LS_COLORS
You could trying setting LS_COLORS in your .bashrc file and make the appropriate changes.

Similar Messages

  • Order of directories and files listed by the ls command

    Per default, the "ls" command lists directories and non-directories separately in lexicographical order.
    Is there a possibility to change that order of listing and sorting?
    For example, if I want "ls" to list my directories and files not by name but by change date +per default+ without using any additional options, what will I have to do?
    Is there a command or a setting which influcenes "ls"'s order of sorting?

    I don't think the defaults for ls can be changed as it is a compiled binary located in /bin. Besides compiling your own version of ls, one solution is to add lines such as the following to /etc/profile or (presuming you're using BASH) ~/.bash_profile and opening a new Terminal window:
    alias l="ls -l"
    alias ll="ls -la"
    I have two such lines in my own profile so that when I type "l" followed by the return key I get the output of "ls -l" and issuing "ll" gives me a listing of dot-files, too.
    Probably not exactly what you were looking for but it does simplify the command issued at the command line and avoid compiling your own.
    hth,
    Johnnie Wilcox
    aka mistersquid

  • How to trace changes in directories and files in windows using java.

    Hi,
    Want to know how to trace changes in directories and files in windows using java.
    I need to create a java procedure that keeps track of any changes done in any directory and its files on a windows System and save this data.
    Edited by: shruti.ggn on Mar 20, 2009 1:56 AM

    chk out the bellow list,get the xml and make the procedure.....     
         Notes          
    1     Some of the similar software’s include HoneyBow, honeytrap, honeyC, captureHPC, honeymole, captureBAT, nepenthes.     
    2     Some of the other hacking software’s include keyloggers. Keyloggers are used for monitoring the keystrokes typed by the user so that we can get the info or passwords one is typing. Some of the keyloggers include remote monitoring capability, it means that we can send the remote file across the network to someone else and then we can monitor the key strokes of that remote pc. Some of the famous keyloggers include win-spy, real-spy, family keylogger and stealth spy.          
    3     Apart from theses tools mentioned above there are some more tools to include that are deepfreeze, Elcomsoft password cracking tools, Online DFS, StegAlyzer, Log analysis tools such as sawmill, etc.

  • Process for setting up new directories and files on Unix

    I am trying to document a process �Process for setting up new directories and files on Unix batch servers�.
    Developer will be developing project on Windows and I need tell them as well as QA team how the Unix directory and file structure.
    Please let me know how is the process in Unix on AIX.
    If I get some documentation regarding this it will be useful.
    Thanks in advance
    Regards
    San

    well on unix/Linux/solaris there are no drives but storage heirarchy starts with a root directory represented with ' / '. and all files and directories are created in root directoy like
    /usr/local/bin
    /export/home/san
    etc
    also filesystem of unix consists iNodes rathar than FAT entries as in case of Windows.
    some basic information is available at
    http://www.techonthenet.com/unix/index.php
    Regards

  • FM to get list of all directories and files on application server..

    Hi All,
    Can anyone tel me FM to get list of all directories and files on application server..i know 'F4_DXFILENAME_TOPRECURSION'
    and '/SAPDMC/LSM_F4_SERVER_FILE' these are working too...but my requirement is when i click F4 i should get list of directories and whn i select one of these the only directory name should display.....and whn click again for 2nd text box field i want file name ...means directory name in one text box field and file name in another....plz help me out..
    helpful answers wil b awarded.
    Thanks,
    Jayshree

    Hi Jayashree
    Please check this FM, SUBST_GET_FILE_LIST. Pass the file path and file name, if it returns an entry in table FILE_LIST, then the filename and path are valid.
    Hope this helps !
    ~ Ranganath

  • Include all sub-directories and files?

    I did search, so don't complain that this has been asked a billion times.
    I am using Automator to replace text for files and folders. But this only works with the files and or folders I select, it doesn't do it with the sub-directories and sub-files. How can I config. Automator to do this?
    Thanks.

    The various actions operate on whatever is input to them. If you are referring to the *Rename Finder Items* action, you can use the *Get Folder Contents* action to go into sub folders, but be careful, since this action will go into bundles/packages such as applications and RTFD files.

  • DIrectories and Files deleted on Snow Leopard upgrade from 10.5.8

    We had a directory with sub folders in the /Volumes directory. When we upgraded snowleopard the directory and files were deleted. Why no warning and why were they deleted? I understand that the /Volumes directory is used as a mount point for external drives etc...,  but why would the upgrade delete files in that directory or better yet why would it allow you to even create an actual directory with files below it if you were not supposed to store files there.  It was a loss  of 40GB or 3.5 years of data. We also found that Time Machine or Carbon Copy do not back up that directory as well.
    Is this a bug related to the permission changes involving UID, GID 200 or what? Why don't backup utilities pick up the files in the /Volumes dir?

    What I do not understand is why a regular directory with files stored in it  under the  /Volumes directory would be deleted when upgraded.
    I realize that you don't understand it. I don't know how I can explain any more clearly than I already have, that it's a reserved directory. If you have anything in that directory other than the automatically-created mountpoint for a local volume or a remote AFP volume, then your system is in an inconsistent state. A potential mountpoint exists, but it's not in use. That should never happen. The Disk Arbitration framework must always be free to create or remove a mountpoint in /Volumes with any name required. Otherwise it won't be able to function as the user expects.
    If a system installation does anything at all, it must leave the system in a consistent state, which means that it must delete the extraneous files from /Volumes. I repeat that I'm sorry you experienced a loss of data due to this misunderstanding. Arguably the Installer should have moved the files to a safe location instead of deleting them, but to be honest, I doubt that it occurred to anyone at Apple that something like this might happen. They took precautions to keep users from tampering with the /Volumes directory.

  • Creating Directories and Files

    I am trying to create directories and sub-directories in a portlet. The user names the File and directories and sub-directories with specific files in each are generated. I can see that it is getting the correct paths for the directories and sub but it will not create the actual directories or files when I do fileName.createNewFile() or fileName.mkdir() as appropriate. Any insight would be greatly appreciated.

    So do you "greatly appreciate" my potentially helpful response yet? Did you get run over by a bus?
    Oh, I understand now. To you, "to greatly appreciate" means "to ignore".
    *BURP*
    (P.S. that might mean "You're welcome", but I likewise leave it to you to interpret)

  • Searching Directories and Files in Application Server

    Hi All,
    I need a function module that will give me all FOLDERS, SUBFOLDERS and FILES in an application server.
    So far function modules like RZL_READ_DIR_LOCAl, SUBST_GET_FILE_LIST and EPS_GET_DIRECTORY_LISTING can only work if I specify at least one folder name after the server IP.
    I wanted the folder names to be searched dynamically by passing only server IP.
    This is for a background program.
    Please help
    Thanks in advance.
    Regards,
    Lily

    Done.

  • Need to verify my directories and files are in good order

    I am not sure my directory and files are in good order. Need to be sure they are configured correctly.

    Use Disk Utility - it's in your Mac's Utilities folder.
    Select the startup volume, then click the Verify Disk button. If it finds any errors it reports in red, describe them.

  • Zipping  and Unzipping Directories and files both - URGENT PLEASE

    Hi friend,
    I tried for zipping and unzipping but it is not working still.
    and have to submit project tomorrow.
    so please as possible as fast just send me the source code that zip the file/folder and unzip in the same way as it was stored.
    ex : if we zip file c:/temp/myfolder/myfile.ppt to .zip
    unzip should c:/temp/myfolder/myfile.ppt
    thanks
    ghanshyam
    9879152949

    I believe (although I don't want to put words in his mouth) that Madan has run across a similar problem that I am trying to solve.
    For instance if I have the following files:
    c:\pic1.gif
    c:\pic2.gif
    c:\pic3.gifand I zip them in to a file called: pics.zip the will unzip just fine.
    However, if I have them in a directory:
    c:\pics\pic1.gif
    c:\pics\pic2.gif
    c:\pics\pic3.gifA listing of the zip files (all using java of-course) will show the files and dirs correctly:
    \pics\pic1.gif
      \pics\pic2.gif
      \pics\pic3.gifbut will give the following error if you try to un-zip them:
    "The system cannot find the path specified"The ZipEntry class has an 'isDirectory()' method, but it only returns true in the case of an EMPTY directory. If , as in my example, there is an actual file at the end of the entry, it returns false.
    So, at least in my case, I would be looking for advice on how to expand files that reside in directories within the zip file.
    Thank You for any help you can provide

  • Sharing directories and files with multiple users

    I have 4 users (family members) on my machine. Up until recently, I only had one account, mine. Now my wife and kids each have an account. The kids do not have admin access. I have several firewire drives, and lately I've been moving most of my documents and other files (photoshop, etc) to a directory on my firewire drive. Then, I've added symbolic links to them from their home directories. Of course, I've had to open up permissions (rwxrwxrwx) on the files and directories. Of course, when one of them creates a file, it will use their umask to create the new files, and then the others won't have access to the new file until I reset the permissions again.
    Is there a way to say, in this folder and below, always use this permission mask? Or, is there a way for me to set their umaks. For my account I can do that, since I have a .bashrc file, but for the other accounts I don't see a .bashrc or .bash_properties or anything where I can but the umask.
    Is this even the best way to go? Any suggestions would be appreciated. How do others do this type of thing?
    Thanks,
    Alfredo

    Alfredo, I think Kurt's example, '1 2 3 4 *", was just to show the place holders. I think you can set up a root crontab by entering sudo crontab -e (if you know how to use vi), or you can do sudo tcsh (or sudo bash) and then do the echo statement as in Kurt's reply.
    And yes you can have multiple commands on the same line like you suggested.
    Here's an example I used in the past:
    00 8,12,16,20 * * * (date && /usr/local/bin/myscript) >> /usr/local/logs/myscript.log 2>&1
    This directs the output and the error output to a log file so I can check on the results periodically. The "&&" between the two commands keeps the second command from running if the first one fails.
    Boyd

  • Color Management and files for web

    I'm doing a layout for a web page in AiCS(11). What are the correct color management policies I should use so the colors will display in Illustrator as they will on the web.
    So far I cannot find a combination that works. Even if I (i think) have color management off.
    Christo.

    Here's the more complete, accurate approach to this.
    In System preferences > Displays > Color run the calibration routine and set the gamma for your display profile to 2.2
    That has nothing to do with Illustrator or Photoshop color settings but everything to do with how well your display is prepared to show you how your images will look on Windows displays.
    In Illustrator, choose sRGB for your working RGB space.
    For profile mismatch policies, for RGB, "Convert to Working Space" is often a good choice for beginners who only do Web work. After you have studied up and practiced some, or if you do more general art prep in Illustrator, you may want to instead use "Preserve Embedded Profiles."
    I do a lot of Web and print work for a number of purposes. All in all, if you are preparing artwork for the Web, you will have best results if you profile your display with a colorimeter and work in sRGB. The only reason to preview in Monitor RGB is to preview how the image will look when the profile is stripped, or when it is displayed in an application ON YOUR CURRENT MONITOR ONLY that isn't color managed.

  • Invisible Directories and Files

    I have a user that has access to the Xserve Raid. On 2 occassions he has moved a directory from one path to another and it has disappeared from his view and he thinks they are lost. I can see the files on the Xserve raid from the Xserver using Finder. I reboot the Xserver and he can see the files. He has discovered that even when he can't see the files, he can still access them with certain commands. Not sure why he can't see the files. Below is an example he gave:
    in this directory:
    /proj/fs8b0/lidar/mcoast0508_musti/bound
    exists the file "awk.mk_ptfile"
    it doesn't show up with "ls", however. But it's there, i can copy it, open it in vi, etc... anyway, look at these commands:
    sg21> ls
    sg21> cp awk.mk_ptfile temp
    sg21> ls
    awk.mk_ptfile temp
    sg21> rm temp
    sg21> ls
    sg21>
    so, ls shows nothing. if I copy "awk.mk_ptfile" to "temp" and then do an "ls", they both show up. But then when I remove just "temp", again, nothing shows up. It's still there, though, it just doesn't show up. If i copy it again and do an "ls", i'll see it, until i delete the copy.

    I hope that both the incidents happened in the same directory. If they did, delete the directory and remake it. If you have ACLs running, maybe it's some crazy combination of ACLs letting this happen. By any chance, and this is a long shot, Are the perms on the parent directory drw-rw-rw- ? In other words, no x's in the perms? If none of these light duty things work out, I'd be worried about either the file system or the RAID itself.
    Roger

  • Open directories  and files?

    I need to add lines to /etc/driver_aliases. How do I get there in terminal?

    Hi
    Try using vi.
    Paul

Maybe you are looking for

  • Computer crashed and I dont know my sync key. and I want to sync my old bookmarks.

    I recently had my school computer crash. right after i set up my sync account. I do not know where I saved my sync key but I do not know it. And I would like to get my freakin bookmarks back for school and whatnot. I am kinda pissed that I couldnt ju

  • ODS activation(urgent Prodution Issue)

    Hello Gurus, I had loaded full upload from <b>R/3 to ODS(ODS1) </b> then in <b>BW system</b> ODS1 to ODS (ODSM) where this is the process: <b>R/3</b> > <i>BW</i>  <b>ODS1(full load)</b>-> <i>BW</i>  <b>ODSM (init load)</b> <b> <u>My Issue</u></b>: wh

  • Server all screwed up

    Ever since the AD went down for maintenance, there have been hiccups using the system. Slow loads, unresponsive reactions to *post message*, and errors, such as this one I just got attempting to post a reply: 500 java.sql.SQLException: Unable to retr

  • Is it ok to keep the MBP charging all the time while in use?

    will it shortened the battery life? or on the other hand, its good? because the life count will be less because i dont shut down my MBP most of the time, maybe i shut it down twice / week, so i keep it charging all the time, even if it;s not in use

  • Microsoft Word crashes with snow leopard. need help! this is aweful

    I installed snow leopard and since then every time i open a word document on my Microsoft word (mac 2008), it crashes and does not open. i can open word and start typing a new doc, save it and then open that one and it works. but if i try to open a d