LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-06-2011, 06:23 PM   #1
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch, Lubuntu 18.04 OpenSUSE Leap 15.x
Posts: 518

Rep: Reputation: 24
how change attributes or remove files with the e attribute set


I have a bunch of files on a usb stick that have just the e attribute set. So I can't chattr them, rm -f fails and chmod fails, all whether as user or root. How can I get rid of the e attribute? Failing that, how can I get rid of the files?
 
Old 07-07-2011, 01:01 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Well, according to this, the 'E' attr cannot be set or reset
http://linux.die.net/man/1/chattr

Start by listing the files info

Code:
lsattr *

ls -l *

# if you've got SELinux, add a Z

ls -lZ *
To delete you'd have to be root and chattr (unset) the 'i' flag if it is set before trying to delete.
Obviously ensure the USB is mounted rw.
 
Old 07-07-2011, 05:55 AM   #3
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch, Lubuntu 18.04 OpenSUSE Leap 15.x
Posts: 518

Original Poster
Rep: Reputation: 24
Quote:
Originally Posted by chrism01 View Post
Well, according to this, the 'E' attr cannot be set or reset
http://linux.die.net/man/1/chattr

Start by listing the files info

Code:
lsattr *

ls -l *

# if you've got SELinux, add a Z

ls -lZ *
To delete you'd have to be root and chattr (unset) the 'i' flag if it is set before trying to delete.
Obviously ensure the USB is mounted rw.
These are the originals of the files on my hd
Code:
g  cd ~/LinuxUse
g  ls
Advanced Bash-Scripting Guide.html  BashReference          ShortNotes~
AwkCheatSheet                       BashTutorial           Tutorials
AwkCom                              BashTutorial~          bashref.html
AwkCommands                         LinuxCommands.txt      gawkref.html
AwkCom~                             LinuxCommands.txt~     jsGuide
AwkOneLinersExplained               Notes                  jsRef
AwkReference                        Notes~                 oAwkTutorial~
AwkReference~                       SedOneLinersExplained  sedref.html
AwkTits                             SedReference           tuts
AwkTutorial                         ShortNotes
g  lsattr
-------------e- ./AwkCom
-------------e- ./ShortNotes~
-------------e- ./oAwkTutorial~
-------------e- ./SedOneLinersExplained
-------------e- ./AwkOneLinersExplained
-------------e- ./gawkref.html
-------------e- ./ShortNotes
-------------e- ./jsRef
-------------e- ./AwkTits
-------------e- ./jsGuide
-------------e- ./LinuxCommands.txt~
-------------e- ./SedReference
-------------e- ./BashTutorial
-------------e- ./Advanced Bash-Scripting Guide.html
-------------e- ./LinuxCommands.txt
-------------e- ./sedref.html
-------------e- ./AwkCom~
-------------e- ./AwkCheatSheet
-------------e- ./BashReference
-------------e- ./tuts
-------------e- ./AwkReference
-------------e- ./Notes
-------------e- ./AwkCommands
-------------e- ./BashTutorial~
-------------e- ./Notes~
-------------e- ./AwkTutorial
-------------e- ./AwkReference~
-------------e- ./bashref.html
-------------e- ./Tutorials
g
I copied them to my usb stick to transfer them to my laptop, but on the usb stick the same commands deliver
Code:
g  cd "/media/NEW VOLUME/LinuxUse"
g  ls
ls: cannot access Tutorials: Input/output error
Advanced Bash-Scripting Guide.html  AwkTits             Notes~                 jsGuide
AwkCheatSheet                       AwkTutorial         SedOneLinersExplained  jsRef
AwkCom                              BashReference       SedReference           oAwkTutorial~
AwkCommands                         BashTutorial        ShortNotes             sedref.html
AwkCom~                             BashTutorial~       ShortNotes~            tuts
AwkOneLinersExplained               LinuxCommands.txt   Tutorials
AwkReference                        LinuxCommands.txt~  bashref.html
AwkReference~                       Notes               gawkref.html
g  lsattr
lsattr: Inappropriate ioctl for device While reading flags on ./AwkCom
lsattr: Inappropriate ioctl for device While reading flags on ./ShortNotes~
lsattr: Inappropriate ioctl for device While reading flags on ./oAwkTutorial~
lsattr: Inappropriate ioctl for device While reading flags on ./SedOneLinersExplained
lsattr: Inappropriate ioctl for device While reading flags on ./AwkOneLinersExplained
lsattr: Inappropriate ioctl for device While reading flags on ./gawkref.html
lsattr: Inappropriate ioctl for device While reading flags on ./ShortNotes
lsattr: Inappropriate ioctl for device While reading flags on ./jsRef
lsattr: Inappropriate ioctl for device While reading flags on ./AwkTits
lsattr: Inappropriate ioctl for device While reading flags on ./jsGuide
lsattr: Inappropriate ioctl for device While reading flags on ./LinuxCommands.txt~
lsattr: Inappropriate ioctl for device While reading flags on ./SedReference
lsattr: Inappropriate ioctl for device While reading flags on ./BashTutorial
lsattr: Inappropriate ioctl for device While reading flags on ./Advanced Bash-Scripting Guide.html
lsattr: Inappropriate ioctl for device While reading flags on ./LinuxCommands.txt
lsattr: Inappropriate ioctl for device While reading flags on ./sedref.html
lsattr: Inappropriate ioctl for device While reading flags on ./AwkCom~
lsattr: Inappropriate ioctl for device While reading flags on ./AwkCheatSheet
lsattr: Inappropriate ioctl for device While reading flags on ./BashReference
lsattr: Inappropriate ioctl for device While reading flags on ./tuts
lsattr: Inappropriate ioctl for device While reading flags on ./AwkReference
lsattr: Inappropriate ioctl for device While reading flags on ./Notes
lsattr: Inappropriate ioctl for device While reading flags on ./AwkCommands
lsattr: Inappropriate ioctl for device While reading flags on ./BashTutorial~
lsattr: Inappropriate ioctl for device While reading flags on ./Notes~
lsattr: Inappropriate ioctl for device While reading flags on ./AwkTutorial
lsattr: Inappropriate ioctl for device While reading flags on ./AwkReference~
lsattr: Inappropriate ioctl for device While reading flags on ./bashref.html
./Tutorials: Input/output error
g
I assume the "e" attribute on the originals caused the foul-up of the copy to usb. So I'd like to get rid of that attribute on the originals, and delete whatever is on the usb stick.
 
Old 07-07-2011, 07:16 PM   #4
porphyry5
Member
 
Registered: Jul 2010
Location: oregon usa
Distribution: Slackware 14.1, Arch, Lubuntu 18.04 OpenSUSE Leap 15.x
Posts: 518

Original Poster
Rep: Reputation: 24
I got rid of the ones on the usb stick with cfdisk, but that really wasn't the preferred option for those on the hd.

So I ran ls -l on each subdirectory and found 2 items whose permissions were all set to ????????? Thunar deleted each of those taken individually, and once they were gone the other items became deletable too.

However, I've not done that. Even though they have this mysterious e attribute still set, they're fully usable and updateable. The entire problem centered in those 2 items with ??????? permissions, and their presence made the entire set undeleteable.

Last edited by porphyry5; 07-07-2011 at 07:27 PM. Reason: added final paragraph
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add/Remove Hidden and ReadOnly attributes from files and directories on vfat filesyst Snigger Linux - Desktop 6 11-11-2015 08:31 AM
Under linux how to set the attribute of a file to make it hidden? zhaohuiyu2 Linux - Newbie 7 04-15-2009 09:09 AM
Impossible to change files attributes to all files in the folder maiden2 Linux - Software 1 09-30-2008 05:09 AM
Change group attribute according to a find list mad4linux Linux - General 8 04-19-2007 01:30 PM
remove read only attribute in user's directory dsholden Linux - Newbie 5 09-14-2005 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:50 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