Sponsored Content
Top Forums Shell Programming and Scripting Files appear to have no content Post 302452652 by jvorwald on Sunday 12th of September 2010 10:33:48 AM
Old 09-12-2010
Thanks for the feedback.
The problem appears to be that I'm opening / processing the file with write permissions.
Since the owner and group are not defined, the file is not opened.

Fixes were
1) Using textpad, open as read only
2) Use chgrp / chown commands to correct group / owner
3) Java: set File as readonly
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compare the content of 2 files

Hi Guys, What is the most effecient way to compare the content of 2 seperate files and extract the result of there is a match? We have 2 separate log files and we are trying to find the common errors from the 2 files. Thanks, Odogbolu98 :( (3 Replies)
Discussion started by: odogbolu98
3 Replies

2. Shell Programming and Scripting

content need changes- many files

Hi, all Need some advise on this script i have some files in a directory, and i need to change the word XX in each files to YY, how can i perform a bulk changes/ thanks in advance for yr sharing (3 Replies)
Discussion started by: swchee
3 Replies

3. UNIX for Dummies Questions & Answers

searching for content of files

Hi, This question may be quite newbish. I've stored a few files on my Unix system and am wondering how to search for their contents (i.e. I input the keyword and get a list of files with this keyword) I'd then like to put it on my website (php). I thought of find and grep, but am not... (19 Replies)
Discussion started by: Aretai
19 Replies

4. Shell Programming and Scripting

comparing files content

hi i have a set of files , i need to compare one file content with other file content, i am using cmp -s abc.1 def.2 , but it is not giving theproper o/p even if the content is different.Please help thanks Satya (1 Reply)
Discussion started by: Satyak
1 Replies

5. Shell Programming and Scripting

Help with Combining Content of Two files

I'm trying to combine it using awk but still can't figure it out. Here is the file. cat file1.txt Mr Smith Mr John Ms Linda cat file2.txt No 4 Jln Empat Kuala Lumpur No 213 Tmn Bunga Kedah No 1 Kampung Bukit Malaysia I want to combine this file1 and file2 so the output... (5 Replies)
Discussion started by: pisang
5 Replies

6. Shell Programming and Scripting

how to find a content in all files

Hi, i would like to find 'AppManage' in all files. i have tried the following but it didn't work. /local/home/mani>grep -iR 'AppManage' *.* - not outcome /local/home/mani>grep -iR 'AppManage' - this one hangs thanks (3 Replies)
Discussion started by: lookinginfo
3 Replies

7. Shell Programming and Scripting

search for content in files. Name of files is in another file. Format as report.

Hi I have multiple files in a folder and one file which contains a list of files (one on each line). I was to search for a string only within these files and not the whole folder. I need the output to be in the form File1<tab>string instance 2<tab> string instance 2<tab>string instance 3... (6 Replies)
Discussion started by: pkabali
6 Replies

8. Shell Programming and Scripting

Compare content between two files

I have two files in unix environment with similer type of contain: Example: File1 File2 Milestone1 Milestone1 Milestone2 Milestone12 Milestone3 Milestone13... (11 Replies)
Discussion started by: Mrinal Mondal
11 Replies

9. UNIX for Beginners Questions & Answers

Swapping content b/n two files

I am having two files file1&file2.i just want to swap the selected contents btwn two files #file1 content: Title:xxxx Hello Imran #file2 content: Title:YYYY Hello Meeran i just want only second line in both files should be swapped.The title should remain in the same file. i just... (5 Replies)
Discussion started by: Meeran Rizvi
5 Replies

10. UNIX for Beginners Questions & Answers

Comparing two files and list the difference with common first line content of both files

I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ? Source File ************* # file: /local/test_1 # owner: own #... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
CHOWN(8)						    BSD System Manager's Manual 						  CHOWN(8)

NAME
chown -- change file owner and group SYNOPSIS
chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ... chown [-fhv] [-R [-H | -L | -P]] :group file ... DESCRIPTION
The chown utility changes the user ID and/or the group ID of the specified files. Symbolic links named by arguments are silently left unchanged unless -h is used. The options are as follows: -H If the -R option is specified, symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal are not followed.) -L If the -R option is specified, all symbolic links are followed. -P If the -R option is specified, no symbolic links are followed. This is the default. -R Change the user ID and/or the group ID for the file hierarchies rooted in the files instead of just the files themselves. -f Don't report any failure to change file owner or group, nor modify the exit status to reflect such failures. -h If the file is a symbolic link, change the user ID and/or the group ID of the link itself. -v Cause chown to be verbose, showing files as the owner is modified. The -H, -L and -P options are ignored unless the -R option is specified. In addition, these options override each other and the command's actions are determined by the last one specified. The owner and group operands are both optional, however, one must be specified. If the group operand is specified, it must be preceded by a colon (``:'') character. The owner may be either a numeric user ID or a user name. If a user name is also a numeric user ID, the operand is used as a user name. The group may be either a numeric group ID or a group name. If a group name is also a numeric group ID, the operand is used as a group name. The ownership of a file may only be altered by a super-user for obvious security reasons. DIAGNOSTICS
The chown utility exits 0 on success, and >0 if an error occurs. COMPATIBILITY
Previous versions of the chown utility used the dot (``.'') character to distinguish the group name. This has been changed to be a colon (``:'') character so that user and group names may contain the dot character. On previous versions of this system, symbolic links did not have owners. The -v option is non-standard and its use in scripts is not recommended. SEE ALSO
chgrp(1), find(1), chown(2), fts(3), symlink(7) STANDARDS
The chown utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compliant. HISTORY
A chown utility appeared in Version 1 AT&T UNIX. BSD
March 31, 1994 BSD
All times are GMT -4. The time now is 02:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy