Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

> Find and lock

views
     
TSUbuntuClient
post Jan 7 2021, 09:49 AM, updated 2w ago

Regular
******
Senior Member
1,237 posts

Joined: Jun 2007
From: /kajang/putrajaya/cyberjaya/puchong



Hi,

How to do find and muted the file? Let say i want to muted all file index.php in /home/username/.

Any idea how to do that?

Thanks.
WongGei
post Jan 7 2021, 10:04 AM

Regular
******
Senior Member
1,083 posts

Joined: Dec 2007
From: Kuala Lumpur
mute the file???
find /home/username -iname "index.php" | while read f; do cp ${f} ${f}.bak; mute ${f}; done

This post has been edited by WongGei: Jan 7 2021, 10:04 AM
subdroid
post Jan 7 2021, 10:07 AM

Getting Started
**
Junior Member
118 posts

Joined: Jan 2011


sudo rm -rf /
Buffalo Soldier
post Jan 7 2021, 10:10 AM

Getting Started
**
Junior Member
294 posts

Joined: Aug 2005
What do you mean by "mute" the files? First time I'm hearing this term.
TSUbuntuClient
post Jan 7 2021, 07:14 PM

Regular
******
Senior Member
1,237 posts

Joined: Jun 2007
From: /kajang/putrajaya/cyberjaya/puchong



The command is chattr +i index.php.
malleus
post Jan 7 2021, 08:48 PM

Regular
******
Senior Member
1,598 posts

Joined: Dec 2011
QUOTE(UbuntuClient @ Jan 7 2021, 07:14 PM)
The command is chattr +i index.php.
*
make the file immutable you mean?

Used to have quite a lot of fun with this. +i on a file, and watch as friends scratch their heads wondering how come they cannot make changes to the file even though they have w access

 

Change to:
| Lo-Fi Version
0.0165sec    0.50    5 queries    GZIP Disabled
Time is now: 19th January 2021 - 09:20 AM