How will u list the contents of parent directory from the current directory? What are the default system wide permissions for a file and directory? What is the default umask value?A user is not able to change the permission , What can it happen? What's the difference between ls -F , ls -p? If a file permission are 000, can the superuser still read and write to that file.? What's the command to remove the files without write permission? How will u make sure that no one can see the files which u had created? How will u change the permissions of a directory recursively? Any response will be greatly appreciated?

Questions by udaybond   answers by udaybond

Showing Answers 1 - 20 of 20 Answers

Rajesh

  • Sep 12th, 2006
 

8) chmod -R direcoryname

7) create a file name starting with "." to make the file as hidden.

or

create a directory named "test", (mkdir test)

and create the files you need inside this directory.( cd test ; touch 1.txt )

change the directory permission to 700 (cd .. ; chmod 700 test)

  Was this answer useful?  Yes

Nilesh Vadnal

  • Sep 13th, 2006
 

1. Ans.==> ls ..

2. Ans.==> for file 644, for directory 755

3. Ans.==> 022

4. Ans.==> he might not owner of that object or the ownership has been changed.

5. Ans.==>

6. Ans.==>Yes

7. Ans.==> rm -f

8. Ans.==> the filename has to be started with "."

9. Ans.==> chmod -r

  Was this answer useful?  Yes

sharvan kumar

  • Sep 21st, 2006
 

hi answer of first Q1.

 ls ~/name of parent dirctory.

eg. like sharvan is parent directory and in which un1 is aother sub dir so the command will be:

 ls ~/sharvan

and if u want to see the contant of root dir, then put ls ~/

Ans: 2 -> see by using  umask command .

Ans 3:->check it by putting umask on the unix.

Ans 4:-> it may so happen user does not have privileage of write.

Ans 5:-> Both are same and give the differntaion among file and directory by putting / at the end of directory.

Ans:8:-> just put . in front of file while ur going to create the file.

for example cat > .sharvan

  Was this answer useful?  Yes

blrjims

  • Sep 23rd, 2006
 

Ans to 5 -

ls -F

             Display a slash (`/') immediately after each pathname that is a
             directory, an asterisk (`*') after each that is executable, an at
             sign (`@') after each symbolic link, an equals sign (`=') after
             each socket, a percent sign (`%') after each whiteout, and a ver-
             tical bar (`|') after each that is a FIFO.

ls -P

      Displays the links directly rather than the object that the link references.

  Was this answer useful?  Yes

1. How will u list the contents of parent directory from the current directory.
ls -l  <directory path>
2. What are the default system wide permissions for a file and directory.
Directory - 777 - rwxrwxrwx
File -      - 055 - ---r_x r_x
3.What is the default umask value.
022
4.A user is not able to chnage the permission , What can it happen.
If he is not the member or owner it will happen
5. What's the differenec between ls -F , ls -p
ls -F - It will shows whether it is a file or directory, to identify the file type
6. If a file permission are 000, can the superuser still read and write to that file.
No, he will not be able to read or write, Inorder to do that, he needs to change the permissions.
7. What's the command to remove the files without write permission.
rm -fr <filename>
8. How will u make sure that no one can see the files which u had created.
Create the file starting with .(DOT) It will be hidden

9. How will u change the permissions of a directory recursivly
Use the chgmod with -R

  Was this answer useful?  Yes

Tim Lincoln

  • Oct 17th, 2006
 

8) placing the "." will not hide files when using the ls -a command.  Creating a subdirectory without the execute privilege for the group and everyone positions will prevent anyone but the owner to view the files in the directory. example:

mkdir myfiles

chmod 744 myfiles

  Was this answer useful?  Yes

Aruna Krishnan

  • Jan 19th, 2007
 

6. If a file permission are 000, can the superuser still read and write to that file.
Super user can read or write the file with 000 permission.

The file can be saved using :w! or :wq!

  Was this answer useful?  Yes

rps1007

  • May 12th, 2008
 

ls .. gives the content of the parent directory
ls ../.. gives the content of parent's parent's direcoty

  Was this answer useful?  Yes

Markerhell

  • Aug 27th, 2009
 

1. ls ../

2. for files: 644
    for directory: 755

3. default umask value: 022

4. He must not be having permissions to access the file, so cant even change the permission of the file

5. Whenever we list the contents, -F will append either of */=>@ indicator and -p will append only / indicator

6. if permission is set 000, superuser CAN STILL read, write in the file.

7. rm -f filename

8. You can create file with name starting '.' so that it will be hidden.

9. To change the permission of the directory recursivaly, use command
   chmod -R directory_name

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions