LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-04-2016, 08:46 AM   #1
postcd
Member
 
Registered: Oct 2013
Posts: 527

Rep: Reputation: Disabled
How to archive (tar,zip..) only files with execute bit?


Hi,

on Linux i know i can use this command:

find /path -type f -perm 700 -exec tar rvf file.tar {} \;

But this will loose the directory structure i assume.

I would like to backup one folder (with all subfolders, recursivelly) and include only files with execute bit, and keep directory structure, please which command to use?

I dont care which archive (tar, tgz, bz, zip, 7z will be used, i prefer tar and tgz)

the result should be archive with directory structure contianing oly files with execute bit

thank You

UPDATE: i think that the command i mentioned works exactly as i needed

Last edited by postcd; 04-04-2016 at 09:06 AM.
 
Old 04-09-2016, 09:34 AM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator response

Post to remove thread from <zero> reply list since OP indicates a solution by editing the OP.
 
  


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 files to a zip archive without having to re write the entire file? gabriel.560 Linux - Software 6 09-13-2011 10:09 AM
Linux zip program's -d -tt option deletes all files from zip archive Arun Gupta Linux - Software 4 04-27-2011 07:06 PM
Archive manager not recognising ZIP files - suggests it's a text file. AnanthaP Ubuntu 4 12-27-2007 07:10 AM
Script to Add files to a Zip archive with out unzipping it !! prashix Programming 12 10-23-2007 09:19 AM
What Are archive.zip files? kajensen Linux - General 1 09-21-2003 04:00 AM

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

All times are GMT -5. The time now is 10:38 AM.

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