LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 05-04-2007, 12:10 AM   #1
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Rep: Reputation: 30
Is there a way to hide file types?


Hi, I have a dual boot between vista and slack11. I am sharing My music with windows, and as such it puts hundreds of album artworks in the folder. It isn't seen in windows, but it sure is in konqueror. I know that I can filter the jpegs once, but once I close the window and go back to it they are back.

Is there a program or a way around this annoyance?
 
Old 05-04-2007, 01:11 AM   #2
deadeyes
Member
 
Registered: Aug 2006
Posts: 605

Rep: Reputation: 78
Quote:
Originally Posted by davidguygc
Hi, I have a dual boot between vista and slack11. I am sharing My music with windows, and as such it puts hundreds of album artworks in the folder. It isn't seen in windows, but it sure is in konqueror. I know that I can filter the jpegs once, but once I close the window and go back to it they are back.

Is there a program or a way around this annoyance?
I don't think that is possible because linux does not uses file extensions like windows does.

Please someone correct if I am wrong
 
Old 05-04-2007, 12:01 PM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
A better Q would how can I show filetypes in Winders (tm)?

The fact that M$ allows you to hide them is actually a security flaw because it allows the .ext of malicious files to be hidden.

Be thankful you can't do this in Linux.
 
Old 05-04-2007, 12:17 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Quote:
The fact that M$ allows you to hide them is actually a security flaw because it allows the .ext of malicious files to be hidden.
I agree with archtoad6. In every Windows I've used I've always turned that "feature" off.
 
Old 05-04-2007, 04:33 PM   #5
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
Well, I don't want to see these files either in Windows. iTunes put all these files in the same directory then makes them hidden. I still want these files, just not see them lol. I'm really suprised that you can't save in the folder settings filter settings per folder.
 
Old 05-04-2007, 11:09 PM   #6
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 31
You could try a .hidden file. I don't know about Slackware, but it works in Kubuntu.

You just create a text file named ".hidden" in the directory and list the file and directory names you don't want to see, one per line. This will make Konqueror treat those as hidden files. You could create this file automatically login with a simple script like this:
Code:
#!/bin/sh
cd /path/to/your/music
ls *.jpg > .hidden
 
Old 05-04-2007, 11:12 PM   #7
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 60
Maybe you could just put the files in a "hidden" folder.
 
Old 05-04-2007, 11:39 PM   #8
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
I thought that, but then I don't think that itunes could then see it. Guess I'm just SOL
 
Old 05-05-2007, 08:50 AM   #9
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
Oops, I just re-read the OP & it seems it's the entire file that's hidden, not just the extension. Apologies for the previous off problem post.

We are up against a different, more interesting problem here: Harmonizing the differences in the ways the 2 OS's mark hidden files.

I am sure everyone here doesn't need the following review, but it might be useful to others reading this later:
File hiding is done differently in the 2 OS's. M$ file systems have a "hidden" attribute, similar to *nix file systems permission bits. Unices, including Linux, treat any file name, including directories, that begins w/ '.' as hidden.

If the .hidden file trick would work when cross-platform browsing, that would be great, but in my test it didn't. On my girlfriend's W2k box I did:
Code:
dir /b /ah > .hidden
in her Documents and Settings directory. The code worked exactly as intended -- .hidden contains a list of all hidden files. Unfortunately, Konqueror did not honor its contents, but did honor the leading '.' in its name. Note, I was using the "smb://" kioslave in Konqueror to do this browsing. This technique doesn't work any better using smb2k, which displays the shares to Konqueror in a subdirectory of an "smb2k" directory in "~" ($home).

Finally, I decided to see if this is a Kubuntu thing & checked it on 2 Linux boxen: SimplyMEPIS 3.3.2, KDE 3.3.2 & SimplyMEPIS 6.0, KDE 3.5.3 -- it didn't work on either. (With apologies to those who know this, MEPIS 6.0 uses the K/ubuntu repositories, 3.3.2 does not.)

AdaHacker,
  • Which Kubuntu?
  • Which KDE?
  • In all 4 cases above I think I did exactly what you suggested:
    Quote:
    You just create a text file named ".hidden" in the directory and list the file and directory names you don't want to see, one per line.
    Especially the "1/line" part. I did check the contents of the .hidden files, I did start new instances of Konqueror, I did not restart X or re-boot.

  • Have you ever used this technique cross-platform?

davidguygc,
  • How are you browsing the M$ file system from Linux?
  • Which ver. of KDE/Konqueror are you using?
 
Old 05-05-2007, 09:43 AM   #10
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
I have these files in a vfat partition mounted under /mnt/MyDoc the files are under "/mnt/MyDoc/My Music"

If this .hidden file idea works, will it work w/ regular expressions? All of these are jpegs, and there are too many to list individually, and I can only assume that a lot are being added/taken away whenever I change anything in my music library

I am using KDE 3.5.4
 
Old 05-05-2007, 07:31 PM   #11
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 31
Quote:
Originally Posted by archtoad6
Which Kubuntu?
I know it works on Feisty and Edgy. It's what they use to hide the system directories under /.
Quote:
Which KDE?
Whichever ones shipped with Kubuntu Edgy and Feisty. Feisty, at least, uses version 3.5.6.
Quote:
In all 4 cases above I think I did exactly what you suggested: Especially the "1/line" part. I did check the contents of the .hidden files, I did start new instances of Konqueror, I did not restart X or re-boot.
No need to restart X. KDE should pick up the changes as soon as the file is saved. The only caveat is that each line has to be the exact file/directory name - even an extra space at the end will throw it off.
Quote:
Have you ever used this technique cross-platform?
Nope. I've only ever seen this on Kubuntu. It could be that this feature was added by the Kubuntu team and isn't part of KDE proper. I don't know and Google failed me on that. I just thought I'd mention the possibility.
 
Old 05-05-2007, 07:33 PM   #12
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 31
Quote:
Originally Posted by davidguygc
If this .hidden file idea works, will it work w/ regular expressions?
No, it doesn't. No regular expressions, no wildcards. Only exact file names. That's why I suggested building the file on login.
 
Old 05-05-2007, 08:34 PM   #13
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
I don't know if I could make a program that could do that in Linux. I probably can for Windows, but I really haven't made any programs in C++ on Linux yet, so I am not familiar with the functions.
 
Old 05-06-2007, 12:04 PM   #14
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
davidguygc, Why the mention of C++? Did I miss something? What's wrong w/ using command line tools, i.e. shell script, batch, .cmd? There is Linux code in post #6, & DOS/Win code in post 9. If the file is created automatically, who cares how big it is? I doubt it's going to fill a partition meant for music. In fact it's going to be a tiny fraction of the size of just the image files it lists, let alone the music files they accompany.

AdaHacker, What about Dapper, do you know one way or the other if this works in Dapper? SimplyMEPIS 6.0 uses the K/Ubuntu 6.06 LTS repositories, if this functionality was added after that, regardless of by whom, then that would explain why it doesn't work for me. OTOH, if it works in Dapper, that would indicate that Ubuntu added this and MEPIS didn't pick it up.

davidguygc, If .hidden works in KDE 3.5.6, but not 3.5.3, & you have 3.5.4, why not just try it & see what happens? The worst case is that we all learn something.
 
Old 05-06-2007, 12:09 PM   #15
davidguygc
Member
 
Registered: Jul 2004
Location: Lubbock, Texas
Distribution: Slackware 12.0 with Beryl 0.2.1
Posts: 334

Original Poster
Rep: Reputation: 30
I only know C++, I don't know how to do anything with shell script other than single line commands, and my system has been down for a couple of days, so I've been unable to try anything out. That's one of the first things I'm gonna do as soon as I get it up and running
 
  


Reply


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
file types vijraj Programming 4 11-15-2006 02:37 AM
How can I hide a file from ls -a? enigma_0Z Linux - Security 12 10-31-2006 12:29 PM
file server types Hondro Linux - Software 3 07-12-2006 09:15 AM
Can i hide a file with bmap???? DropSig Linux - Security 3 01-29-2006 06:32 AM
file types jclark00001 Linux - Newbie 2 02-17-2003 03:07 PM


All times are GMT -5. The time now is 01:08 PM.

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