1822430 Members
2985 Online
109642 Solutions
New Discussion юеВ

hidden files

 
SOLVED
Go to solution
himacs
Super Advisor

hidden files

Hi gurus,

i want to make some hidden files as unhidden.
Plz help me on this


regards
himacs
13 REPLIES 13
saravanan08
Valued Contributor

Re: hidden files

hi himacs

To make it as unhidden kindly remove the . symbol infront of the filename

Example

if it is .Test means make it as Test
James R. Ferguson
Acclaimed Contributor

Re: hidden files

Hi:

Define "hidden".

If you mean files whose name begins with a dot ('.') then add the '-a' switch to 'ls'.

If you mean files (usually temporary ones) that have been opened; unlinked (removed) but are still in-use until the last process using them terminates; then you need to use 'lsof' available from the HP Porting Centre.

Regards!

...JRF...
himacs
Super Advisor

Re: hidden files

Hi Saravan,

Thanx for the reply...

actually my profile .profile is hidden. I want to unhidden this.Any commands r there to make file as unhidden..


himacs
himacs
Super Advisor

Re: hidden files

Hi,

i have some files under home directory like profile,.login etc.I use ls -la to list these files in some servers.But remaining servers i use ls or ll to list.

i heard that ls -la used to list hidden files.
So i want those files to list once i enter ls or ll not ls -la.

i dont want remove dot(.) from any files.

my servers are B.11.23


help on this


himacs


James R. Ferguson
Acclaimed Contributor
Solution

Re: hidden files

Hi (again):

> I heard that ls -la used to list hidden files. So i want those files to list once i enter ls or ll not ls -la.

OK, define an alias for 'ls' in your '${HOME}/.profile' or in '/etc/profile' assumiong that your users use the POSIX or Korn shell. Add a line like this:

alias ls='ls -a'

Now whenever you type 'ls' it will be as if you entered 'ls -a'. This allows you to add additional switches. For example:

# ls -lt

...acts as 'ls -alt'

Regards!

...JRF...
saravanan08
Valued Contributor

Re: hidden files

Hi himacs,

I agree with James..

I tried Mr.James idea and it is working fine.

you can apply the same if you wish..

Thanks James.
Steven Schweda
Honored Contributor

Re: hidden files

> alias ls='ls -a'

"-A" might be less annoying than "-a".
Bill Hassell
Honored Contributor

Re: hidden files

Files that start with a dot (or period) will always be hidden -- this is standard Unix behavior. ls and ll are only a couple of commands that don't show hidden files (or show). For instance, using filename expansion characters such as * will not display hidden files without adding additional characters:

ls
echo *

Since this is a basic Unix concept, it is best to learn the rules rather than look for a special workaround.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: hidden files

>So I want those files to list once I enter ls or ll not ls -la.
>I don't want remove dot(.) from any files.

Simply hardlink each:
$ ln .profile profile

Then you have both. One for doing and one for looking.
Ganesan R
Honored Contributor

Re: hidden files

Hi Himacs,

Due to security reasons these files kept as hidden and can be viewed with -a option except for root user. root user can view without -a option.

So donot try to change the file format from .filename
Best wishes,

Ganesh.
Dennis Handly
Acclaimed Contributor

Re: hidden files

>Ganesan: Due to security reasons these files kept as hidden

I've never heard that. Dot files are hidden because you don't want to waste time looking at them, it's a user interface bell and whistle.
Steven E. Protter
Exalted Contributor

Re: hidden files

Shalom,

I hide files the old fashioned way.

With user permissions

chmod o-rwx filename

Then users in the group can not read, write or execute.

chmod g-rwx

Then users in the same group as the owneralso can not read write or execute.

If you want, you can even hide files from yourself.

No matter what you do, root is going to be able to see the files.


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
himacs
Super Advisor

Re: hidden files

Hi admins,

Thanx for ur replies.Actually i wanted know how to unhide the hidden files.This thread was informative.Thnax once again.Points assigned..


regards
himacs