LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 09: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, 09: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, 10: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, 10: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



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 06:32 AM
How program to read files with extension .dat y .cfg files COMTRADE in fedora 1? ivonne Linux - Software 0 11-22-2004 11:42 AM
How can konqueror view html files in .gz & .bz2 files directly? ailinzhe Linux - Software 5 05-24-2004 08:36 AM
Immutable Bits Geeky_Kid Linux - General 1 12-22-2003 05: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 02:38 AM

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

All times are GMT -5. The time now is 04:01 AM.

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