The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
TAHI Test Suite 3.0.13 (IPv6 Conformance Test Tool branch) iBot Software Releases - RSS News 0 04-06-2008 09:20 AM
test if there are files in directory RSAM2007 UNIX for Advanced & Expert Users 1 10-17-2007 01:52 PM
Keithley Introduces Linux-Based RF Parametric Test Systems - Test and Measurement.com iBot UNIX and Linux RSS News 0 07-23-2007 07:30 AM
how to test filename is file or directory balireddy_77 Shell Programming and Scripting 1 11-01-2006 06:20 AM
How to test directory availibility santuna HP-UX 3 09-30-2005 05:40 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 12-27-2007
Registered User
 

Join Date: Dec 2007
Posts: 42
test and .test in same directory

i am using solaris 5.10. i can create two different files "test" and ".test" in the same directory. now suppose i want to change the attribute of the hidden file .test to visible is it possible???

since "." is just an attribute to mark a file hidden why is unix allows creation of "file" and ".file" in the same directory
Reply With Quote
Forum Sponsor
  #2  
Old 12-27-2007
andryk's Avatar
Registered User
 

Join Date: Sep 2003
Posts: 448
I dont think its an attribute ... but i might be wrong, file and .file are two different file really, the leading dot is part of the filename but interpreted so to hide the file with "normal ls'ting"
Reply With Quote
  #3  
Old 12-27-2007
Registered User
 

Join Date: Dec 2007
Posts: 42
thats exactly my question. if leading "." is interpreted has making the file hidden, why does unix allows to creating a "file" when ".file" is present.

conversely if suppose i have "file" and ".file" in my directory isnt there any way i can make ".file" visible without changing either of the file names
Reply With Quote
  #4  
Old 12-27-2007
andryk's Avatar
Registered User
 

Join Date: Sep 2003
Posts: 448
sure there is, just type 'ls -a' you'll list both file and .file.
And you can access both files with same way with no special requirement for the dotted one ...
Reply With Quote
  #5  
Old 12-27-2007
Registered User
 

Join Date: Dec 2007
Posts: 42
Quote:
Originally Posted by andryk View Post
sure there is, just type 'ls -a' you'll list both file and .file.
And you can access both files with same way with no special requirement for the dotted one ...

buddy ls -a is for viewing hidden files. my question is that is there any way we can make ".file" a normal visible file.. one u can see wid ls command
Reply With Quote
  #6  
Old 12-27-2007
andryk's Avatar
Registered User
 

Join Date: Sep 2003
Posts: 448
okay dig that, but why would you want that? i cant think of anything except to hack the source of ls really (not kidding!)
Reply With Quote
  #7  
Old 12-27-2007
Registered User
 

Join Date: Dec 2007
Posts: 42
itz not abt "why i would want to do that", its about "why does it happen"... ever since i have started working on unix, i have been fascinated by itss simplicity and consistency... itz so unUNIX like, not allowing to do something that could be done......
anyways thanks for ur help

Its not about "why I would want to do that", its about "why does it happen"... Ever since I have started working on unix, I have been fascinated by its simplicity and consistency. Its so un-unix-like, not allowing to do something that could be done. Anyway, thanks for your help.

See rule 9 please.

Last edited by blowtorch; 12-27-2007 at 08:54 PM. Reason: grammar
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 05:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0