LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 09-20-2012, 02:30 AM   #1
secretlydead
Member
 
Registered: Sep 2003
Location: Qingdao, China
Distribution: mandriva, slack, red flag
Posts: 249

Rep: Reputation: 31
some files in a directory listable others invisible?


hi,

if i have rx permissions on a directory, is there a way i can make some files/directories within the directory listable while others remain invisible?

thanks.
 
Old 09-20-2012, 05:29 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 719

Rep: Reputation: 103Reputation: 103
The leading " . " makes the files "invisible" You can rename the files to see or use the "a" option on ls. I would avoid renaming though as these are usually configuration files and renaming may break certain packages.

Most file managers also have options to show "invisible" files.
 
Old 09-20-2012, 09:13 AM   #3
secretlydead
Member
 
Registered: Sep 2003
Location: Qingdao, China
Distribution: mandriva, slack, red flag
Posts: 249

Original Poster
Rep: Reputation: 31
thanks for the reply.

I meant invisible to another user.

For example, if:
ls -l:
./ 611
../ 611
file1 610
file2 611

how can i make another user:
ls -l

and return

./
../
file2

i.e., don't show one of the files, the file where if the user:
cat file1
he would get a permission denied error

Last edited by secretlydead; 09-20-2012 at 09:28 AM.
 
Old 09-20-2012, 06:48 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Just amend the perms on the dir eg rwxrwx---.
If there is no-one else in your group, then rwx------

You can do the same to the files if you want. Don't have a Linux system in front of me to test all the permutations.
 
  


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
Directory is invisible in listing but it is exist. BCJapan Linux - Enterprise 5 09-25-2009 02:06 PM
Directory with .htaccess is invisible?! Barca Linux - General 5 02-23-2005 01:28 PM
Invisible Directory 900i Mandriva 6 12-09-2004 04:26 PM
X11 directory invisible? astrowill Linux - Newbie 3 07-22-2004 01:46 PM
invisible directory prowlerxpla Linux - Software 1 09-11-2003 10:50 AM


All times are GMT -5. The time now is 02:58 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration