One doubt regarding chmod command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting One doubt regarding chmod command
# 1  
Old 02-07-2011
One doubt regarding chmod command

which one is correct

chmod 777 file.txt or chmod 777 / file.txt

what is difference in these two commands?

thanx in advance
# 2  
Old 02-07-2011
The first just changes the file mode of the file which named "file.txt" to 777.The second changes the file mode of directory "/" and file "file.txt".Read some textbooks,they will tell you more.
# 3  
Old 02-07-2011
What are you wanting to accomplish? Are you just needing some help changing file permissions or are you trying to learn by understanding something you're looking at.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Doubt in ls command

dear users and experts, i am stuck withis command and i am unable to understand what is it doing?? ls -d * (7 Replies)
Discussion started by: seshank
7 Replies

2. Shell Programming and Scripting

How to use chmod command inside ftp block?

hi, i want to use chmod command inside ftp. so that what ever files are transfered to the local server will hav 664 permission. if i use chmod inside ftp , the file permissions gets changed in the remote server and when the file is transffered to local server using get command, it does not... (8 Replies)
Discussion started by: Little
8 Replies

3. Solaris

chmod command in SunOS

Hi Bros, I have a question want to receive your help. On SunOS server. I have 1 file in /etc. mode of file is "read only". I've used chmod 777 commmand to change mode of that file. firstly, it's ok. but about 3 mins after that. The mode of that file rollback to "read only". I don't know how.... (4 Replies)
Discussion started by: hikaru022002
4 Replies

4. UNIX and Linux Applications

What is the difference between chmod in solaris and chmod in Linux?

i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies

5. UNIX for Dummies Questions & Answers

Doubt on free command

All, I have doubts related to free command in Linux. My environment is RHEL5 - 64 bit OS We have 2 node RAC database installed Query output from node 1 is Free -g Total used free shared buffers cached Mem: 32 25 7 0 5 15 -/+ buffers/cache: 4 27 Swap: 30 0 30 Query... (2 Replies)
Discussion started by: user7509
2 Replies

6. UNIX for Dummies Questions & Answers

doubt in tr command

Hi, I am trying to understand a script and found a line as follows: tr '\211\233\240' '\040' < $IN_FILE | tr -cd '\11\12\15\40-\176' > $TEMP_FILE Can any one explain the above line .. What are they trying to translate using the tr command.. I have not used tr command.. so feeling little bit... (2 Replies)
Discussion started by: risshanth
2 Replies

7. Solaris

chmod command

Hi, I want to create one user who has right to run chmod command in solaris, Any Idea? (7 Replies)
Discussion started by: manoj.solaris
7 Replies

8. UNIX for Dummies Questions & Answers

Required help in chmod command

I have files inside the some directories. The no. of files in each directory will vary from 1 to 500K. I need to change the permissions of all the files to 400 mode. When the files are large in numbers...the command $chmod 400 * fails saying "ksh: /bin/chmod: arg list too long" so I have... (5 Replies)
Discussion started by: lokachari
5 Replies

9. Shell Programming and Scripting

change file type to hidden using chmod command

I want to make a hidden file with chmod command. Example: I have a file name inputfile.txt -rw-r--r-- 1 xxxxxx xxxxxx 1388 Sep 12 05:41 inputfile.txt I want to hide that file using chmod command. Please tell me if it is possible or there is some other way to do this. Thanks... (2 Replies)
Discussion started by: rinku
2 Replies

10. UNIX for Dummies Questions & Answers

chmod command for recently modified files

hello! is there a way for me to use the chmod command to change permissions for several files all at once -based on the fact that these files were all most recently modified TODAY ? I can't use a wildcard on their filenames because the filenames are varied. But I was hoping I could somehow do... (2 Replies)
Discussion started by: polka_friend
2 Replies
Login or Register to Ask a Question