[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Add comment to file in linux

Posted on 2009-02-08
9
Medium Priority
?
1,474 Views
Last Modified: 2012-05-06
Such as keyword comment   in to a file or directory
0
Comment
Question by:teera
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 23587599
You can't add comments to a directory, but to add a comment to a PHP file, you do


//  This is a comment

or

/*  This is a
comment
that goes
over several lines
*/
0
 

Author Comment

by:teera
ID: 23587675
i mean add comment to the file not inside php file such as in windows when i right click select properties i can andd comment to a file
0
 
LVL 48

Assisted Solution

by:Tintin
Tintin earned 400 total points
ID: 23587830
That's not possible in Linux/Unix.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 16

Assisted Solution

by:ai_ja_nai
ai_ja_nai earned 1200 total points
ID: 23588337
Not possible, in UNIX most of times you leave a README file with the comments in the same dir of the file
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 400 total points
ID: 23589273
unix files and directories can not have comments. the file / directory properties / attributes are stored in an inode in a file system and inodes do not have an attribute for comments.
0
 
LVL 10

Expert Comment

by:pvginkel
ID: 23589362
What do you need this feature for? If you give us a little bit more information, maybe we can think of a different solution for you.

If it's for a website, you can always create secondary files. For example, you have a word document:

January Sales Report.doc

Then you create the following file:

January Sales Report.doc.comment

Where you put the comment in.
0
 

Author Comment

by:teera
ID: 23719481
i want to create a commnet when search file i want to search from comment
0
 
LVL 48

Expert Comment

by:Tintin
ID: 23719514
I realise English isn't your main language, but I have no idea what you mean by your last post.

0
 
LVL 16

Accepted Solution

by:
ai_ja_nai earned 1200 total points
ID: 23719787
>i want to create a commnet when search file i want to search from comment

he wants to add metadata to files, so that when he does a search among his files he can retrieve them by this metadata. I suppose he wants this and the answer, again, is NO YOU CAN'T :) ext3 does not support metadata tagging
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month20 days, 3 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question