test and .test in same directory


 
Thread Tools Search this Thread
Operating Systems Solaris test and .test in same directory
# 1  
Old 12-27-2007
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
# 2  
Old 12-27-2007
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"
# 3  
Old 12-27-2007
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
# 4  
Old 12-27-2007
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 ...
# 5  
Old 12-27-2007
Quote:
Originally Posted by andryk
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
# 6  
Old 12-27-2007
okay dig that, but why would you want that? i cant think of anything except to hack the source of ls really (not kidding!) Smilie
# 7  
Old 12-27-2007
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 11:54 PM.. Reason: grammar
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Test if a script can cd into a directory

Is there a way for a bash script to test if it can cd into a directory without actually attempting to cd into it? I am looking for something along the lines of: if ;then #code to execute fi except in this case I don't want to test if the directory exists; what I want is to test... (8 Replies)
Discussion started by: dexdex200
8 Replies

2. Shell Programming and Scripting

Prefixing test case methods with letter 'test'

Hi, I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
Discussion started by: royalibrahim
5 Replies

3. Shell Programming and Scripting

How to check weather a string is like test* or test* ot *test* in if condition

How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies

4. Shell Programming and Scripting

Test on string containing spacewhile test 1 -eq 1 do read a $a if test $a = quitC then break fi d

This is the code: while test 1 -eq 1 do read a $a if test $a = stop then break fi done I read a command on every loop an execute it. I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test. For example echo hello. Now the... (1 Reply)
Discussion started by: Max89
1 Replies

5. UNIX for Advanced & Expert Users

test if there are files in directory

Hi, I am trying to test if there are files in a directory and if theres i want to get a list. Any ideas? Thanks in advance (1 Reply)
Discussion started by: RSAM2007
1 Replies

6. HP-UX

How to test directory availibility

Hello, I'm trying to test if a directory specified in a script parameter is available or not. I wrote a little code to do so, but there's a problem because I receive an error message. My code: #Verify command parameter if then echo 'Incorrect command parameter' echo... (3 Replies)
Discussion started by: santuna
3 Replies
Login or Register to Ask a Question