Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 12 Dec 2019, 02:14
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How can I remove Extended attributes from several files?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
fernan

Joined: 23 Jan 2007
Posts: 422
Location: Buenos Aires

PostPosted: Sun 20 Oct 2019, 11:10    Post subject:  How can I remove Extended attributes from several files?
Subject description: "user.com.dropbox.attributes"
 

Hello. Running Bionicpup 32 bit on my laptop, frugal install, noted many files have the XATTR label shown on ROX filer.

Checked what XATTR they have, and I see
Quote:
user.com.dropbox.attributes
in many files, seems from the time I was connected to Dropbox. I've disconnected all my computers from that site, so I don't need those attributes anymore.

If possible, I'd like to remove the extended attributes instead of just "hiding" them in ROX.

I see I can't select many files at once and edit the attributes from the ROX contextual menu :
Quote:
"You cannot do this to more than one item at a time"


Is there any command line or editor to do this recursively on some directory?

Thanks very much.
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3675

PostPosted: Sun 20 Oct 2019, 11:39    Post subject:  

I usually use find with a exec action ... ls -l on each .txt file in this example

The {} just says where to put each matched filename and the ; at the end of command action needs to be escaped (\) so its not interpreted

find . -name "*.txt" -exec ls -l {} \;

.. alternatively you can use

find . -name "*.txt" -exec ls -l {} ";"

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
fernan

Joined: 23 Jan 2007
Posts: 422
Location: Buenos Aires

PostPosted: Sun 20 Oct 2019, 21:31    Post subject:  

Thanks,

perhaps my question was not clear enough, I want to batch edit the files and remove the extended attributes.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 1224

PostPosted: Tue 22 Oct 2019, 05:23    Post subject:  

You can remove extended attributes with either one of these two commands:
Code:

attr [-LRSq] -r attrname pathname                 # remove attr

setfattr  -x, --remove=name       remove the named extended attribute

If niether one is installed you could simply move each file to a file system that doesn't support extended attributes, such as vfat, and move the file back to its regular place.

As simple as it sounds, this approach has many disadvantages brought in by the limitations of vfat, such as possibly changing file timestamps, permissions, and ownership, file size limitations, and more
(this is one of the many good articles on the subject
https://www.osnews.com/story/9681/the-vfat-file-system-and-linux/)

_________________
Fatdog64-810|+Packages|Kodi|gtkmenuplus
Back to top
View user's profile Send private message 
fernan

Joined: 23 Jan 2007
Posts: 422
Location: Buenos Aires

PostPosted: Tue 22 Oct 2019, 08:09    Post subject:  

Thanks very much, I'll try the
Code:
 find -exec
command with this.
Back to top
View user's profile Send private message 
fernan

Joined: 23 Jan 2007
Posts: 422
Location: Buenos Aires

PostPosted: Tue 22 Oct 2019, 08:28    Post subject:  

This command seems to work fine :

Code:
find . -name "*" -exec setfattr -x  user.com.dropbox.attributes {} \;
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0397s ][ Queries: 12 (0.0055s) ][ GZIP on ]