1752785 Members
6279 Online
108789 Solutions
New Discussion юеВ

Re: 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.