03-21-2012
Quote:
Originally Posted by
methyl
What Operating System are you running when you type this command?
Not expecting "-r" to have another parameter.
I'm still using Linux 2.6.32-33-server (Ubuntu 4.4.3) here.
I read the
hdparm manual and found out to set parameter with this syntax ( -r1 ).
hdparm /dev/sda9 showed readonly set to 0.
after
hdparm -r1 /dev/sda9 it showed readonly = 1 (on)
but still write operations allowed. also tried with another user than 'root'.
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I'm new at this whole Unix thing, but definately learning (lots of fun)...
and I was wondering - how do you make a file read-only with vi? I don't mean how do you load up vi in read-only mode, but how do you save a file (or flag a file, or whatever) in vi to read-only? How do you make it... (2 Replies)
Discussion started by: Flyguy
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have create a user using the following command
useradd -d /home/rozan -s /bin/bash -c "Rozan ahmed" -g dba rozan
I would like to give her only the read only access to
$BDUMP_HOME/alert.log file
The owner of the file is oracle:oinstall
Regards
Faruque (13 Replies)
Discussion started by: faruque.ahmed
13 Replies
3. UNIX for Advanced & Expert Users
Hi All,
May be this is a very simple question...
$ b=8
$ readonly b
$ echo $b
8
$ b=90
-bash: b: readonly variable
$ unset b
-bash: unset: b: cannot unset: readonly variable
I m not able to change the readonly mode of variable b
Please help me out..
Thanks
Nidhi (2 Replies)
Discussion started by: Nidhi2177
2 Replies
4. Shell Programming and Scripting
After I issused $readonly THIN. How to change back the varaibale from read only to writeable? (1 Reply)
Discussion started by: Paris Heng
1 Replies
5. Debian
I would want one of my partition to be mounted read only always... How to do that ?
1. /etc/fstab
I know that, in options we can give ro -- so when the machine boots up or 'mount -a' it will be mounted read only. But i dont want that to be mounted when machine boots up.
We will mount that... (3 Replies)
Discussion started by: thegeek
3 Replies
6. AIX
LOGNAME variable is set as READONLY in .profile.
I want to make it WRITEABLE so that I can modify the LOGNAME values programatically/throush shell programs.
Thanks,
Guru (1 Reply)
Discussion started by: gurubbc
1 Replies
7. Linux
I see this when tried to create a dir using root
fstab entries are pretty normal
tried to remount with rw but it is still the same
block device /dev/sda2 is write-protected
---------- Post updated at 04:57 PM ---------- Previous update was at 03:51 PM ----------
fstab entry ... (4 Replies)
Discussion started by: robo
4 Replies
8. Shell Programming and Scripting
Hi,
I am new to shell programming. I just wanted to know if I set a variable to readonly. How do I revert it back to normal.
name="some_name"
readonly name
Now I want to make name variable back to it normal, on which I can perform write operation too.
Thanks (3 Replies)
Discussion started by: dearvivekkumar
3 Replies
LEARN ABOUT OSX
ppi::cache
PPI::Cache(3) User Contributed Perl Documentation PPI::Cache(3)
NAME
PPI::Cache - The PPI Document Caching Layer
SYNOPSIS
# Set the cache
use PPI::Cache path => '/var/cache/ppi-cache';
# Manually create a cache
my $Cache = PPI::Cache->new(
path => '/var/cache/perl/class-PPI',
readonly => 1,
);
DESCRIPTION
"PPI::Cache" provides the default caching functionality for PPI.
It integrates automatically with PPI itself. Once enabled, any attempt to load a document from the filesystem will be cached via cache.
Please note that creating a PPI::Document from raw source or something other object will not be cached.
Using PPI::Cache
The most common way of using "PPI::Cache" is to provide parameters to the "use" statement at the beginning of your program.
# Load the class but do not set a cache
use PPI::Cache;
# Use a fairly normal cache location
use PPI::Cache path => '/var/cache/ppi-cache';
Any of the arguments that can be provided to the "new" constructor can also be provided to "use".
METHODS
new param => $value, ...
The "new" constructor creates a new standalone cache object.
It takes a number of parameters to control the cache.
path
The "path" param sets the base directory for the cache. It must already exist, and must be writable.
readonly
The "readonly" param is a true/false flag that allows the use of an existing cache by a less-privileged user (such as the web user).
Existing documents will be retrieved from the cache, but new documents will not be written to it.
Returns a new "PPI::Cache" object, or dies on error.
path
The "path" accessor returns the path on the local filesystem that is the root of the cache.
readonly
The "readonly" accessor returns true if documents should not be written to the cache.
get_document $md5sum | $source
The "get_document" method checks to see if a Document is stored in the cache and retrieves it if so.
store_document $Document
The "store_document" method takes a PPI::Document as argument and explicitly adds it to the cache.
Returns true if saved, or "undef" (or dies) on error.
FIXME (make this return either one or the other, not both)
TO DO
- Finish the basic functionality
- Add support for use PPI::Cache auto-setting $PPI::Document::CACHE
SUPPORT
See the support section in the main module.
AUTHOR
Adam Kennedy <adamk@cpan.org>
COPYRIGHT
Copyright 2005 - 2011 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
perl v5.16.2 2011-02-25 PPI::Cache(3)