LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-15-2005, 10:33 PM   #1
wasp
LQ Newbie
 
Registered: Mar 2005
Posts: 9

Rep: Reputation: 0
Immutable files


How does one go about setting flags on files, such as the immutable flag?

On BSD I would use the chflags() syscall, but I'm told that Linux doesn't have this.

What is the equivalent?
 
Old 11-15-2005, 10:54 PM   #2
rshaw
Senior Member
 
Registered: Apr 2001
Location: Perry, Iowa
Distribution: Mepis , Debian
Posts: 2,692

Rep: Reputation: 45
man chattr
 
Old 11-15-2005, 11:05 PM   #3
wasp
LQ Newbie
 
Registered: Mar 2005
Posts: 9

Original Poster
Rep: Reputation: 0
chattr isn't a system call though, is it?

I'm looking for something low-level that can be used in a minimalist C program.

chattr also appears to be filesystem dependant, which is a pain too.
 
Old 11-15-2005, 11:12 PM   #4
wasp
LQ Newbie
 
Registered: Mar 2005
Posts: 9

Original Poster
Rep: Reputation: 0
Ok, found this if anybody is interested:

http://www.danlj.org/lad/src/setflags.c.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Able to write files to MP3 player but no files written into actual device? olnex Linux - Hardware 0 11-11-2005 07:32 AM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 12:42 PM
How can konqueror view html files in .gz & .bz2 files directly? ailinzhe Linux - Software 5 05-24-2004 09:36 AM
Immutable Bits Geeky_Kid Linux - General 1 12-22-2003 06:58 AM
How to filter files in files and files which are in a sub-directory with "grep"? Piero Linux - Newbie 9 08-29-2003 03:38 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration