1848680 Members
7043 Online
104035 Solutions
New Discussion

Re: Hidden files

 
SOLVED
Go to solution
Ngoh Chean Siung
Super Advisor

Hidden files

Hi,

1) All the hidden files is start with .abc
Am I right?

2) How to make a file become hidden?

3) If login as root, all the hidden files can be viewed normally. But for normal user, they have to user ll -a command to view hidden files. Is there any command to enable the particular user to view the hidden files without -a command? (The user id for the user must not same as root which is 0)

regards.
11 REPLIES 11
Sanjay Kumar Suri
Honored Contributor

Re: Hidden files

1. Yes
2. The file need to begin with dot.
3. Use alias ls="ls -al" in .shrc or .cshrc.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Mark Grant
Honored Contributor

Re: Hidden files

1) yes

2) rename it to have a "." in front of it.

3) No, sorry
Never preceed any demonstration with anything more predictive than "watch this"
Ngoh Chean Siung
Super Advisor

Re: Hidden files

Hi Sanjay,

1) What is .cshrc and .shrc used for?

2) I need to put in "ls -al" inside .cshrc
Where should I put it? Attach is my .cshrc file.

regards.



Sanjay Kumar Suri
Honored Contributor
Solution

Re: Hidden files

.shrc & .cshrc are optional shell startup scripts.

POSIX users define it using ~/.shrc whereas C Shell users use ~/.cshrc.

Use vi .shrc to define as below:

alias ls="ls -al"

sks

A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
V. Nyga
Honored Contributor

Re: Hidden files

Hi,

it depends on which shell is configured for you! It is fixed in the passwd file.

Also you can change it 'csh' for c-shell, for example.
.cshrc is read when logging in with csh,
.profile is read with ksh (korn-shell).

Write for example:
alias ll 'ls -al'
anywhere in your .cshrc

Regards
Volkmar
*** Say 'Thanks' with Kudos ***
Sanjay Kumar Suri
Honored Contributor

Re: Hidden files

Since you are using csh use the syntaz as listed in the sample .cshrc file

# alias d dirs
# alias pd pushd
# alias pd2 pushd +2
# alias po popd
# alias m more

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
T G Manikandan
Honored Contributor

Re: Hidden files

THere are some files which are user initialization files

for sh/ksh .profile
csh .cshrc and .login

Just inside your .cshrc,

alias ls ls -cFa

Once you put this inside the .cshrc file it becomes persistent everytime you log in.
to be simple the file is used to create the customized user enviroment.

Hidden files start with dot "."
Ngoh Chean Siung
Super Advisor

Re: Hidden files

Hi,

Is there any difference between

alias ls ls -cFa & alias ll ls al

regards.
Mark Grant
Honored Contributor

Re: Hidden files

"ll" is just a hard link to "ls" with the command doing different things depending on the name is was called as.

With this in mind, there is no difference between alias "ll" and alias "ls"
Never preceed any demonstration with anything more predictive than "watch this"
Ngoh Chean Siung
Super Advisor

Re: Hidden files

Hi,

Actually the one that I not clear is

-cFa & al

What is -cFa & al stand for?

Any different?

regards.
V. Nyga
Honored Contributor

Re: Hidden files

Hi,

you can check this with 'man ls'

Option F shows a slash if it is a dir, an * if the file is executable, a @ if it is a symbolic link.
-c shows last modification of inode

V.
*** Say 'Thanks' with Kudos ***