Author |
Message |
fernan
Joined: 23 Jan 2007 Posts: 422 Location: Buenos Aires
|
Posted: 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
|
|
 |
rufwoof

Joined: 24 Feb 2014 Posts: 3671
|
Posted: 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
|
|
 |
fernan
Joined: 23 Jan 2007 Posts: 422 Location: Buenos Aires
|
Posted: 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
|
|
 |
step
Joined: 04 May 2012 Posts: 1222
|
Posted: 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-802|+Packages|Kodi|Findnrun|+forum|gtkmenuplus
|
Back to top
|
|
 |
fernan
Joined: 23 Jan 2007 Posts: 422 Location: Buenos Aires
|
Posted: Tue 22 Oct 2019, 08:09 Post subject:
|
|
Thanks very much, I'll try the command with this.
|
Back to top
|
|
 |
fernan
Joined: 23 Jan 2007 Posts: 422 Location: Buenos Aires
|
Posted: 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
|
|
 |
|