Search Results

Search found 1059 results on 43 pages for 'exclude'.

Page 2/43 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How do I zip up a folder but exclude the .git subfolder

    - by Tom
    I'm trying to create a zip file from a folder and I'd like to exclude the .git sub-folder from the resulting zip file. I have gone to the parent folder of the one I want to zip (called bitvolution) and I'm doing: zip -r bitvolution.zip bitvolution -x ".git" But it doesn't exclude the .git sub-folder. I've tried various combinations, -x .git*, -x \.git/*, -x .git/\*, -x \.git/\*. I've also tried using the full path for the exclude argument... but just didn't get there.

    Read the article

  • How do I exclude directories from my Windows 7 backup?

    - by mattalexx
    I'm setting up a backup for a friend's computer onto his USB drive. I was reading this article about the Windows 7 Backup and Restore feature. Everything looks okay, but for the life of me, I can't figure out how to get to this screen: I need to set up some excluded folders, since the backup media is a little smaller than the home folder. I need to exclude the replaceable 100 GB video directory.

    Read the article

  • rsync - How to exclude one .htaccess but not all of them

    - by Cory Gagliardi
    I have an rsync command for copying my files from dev to production. I don't want to copy the .htaccess file that's in the root of the HTML directory but, I do want to copy the few .htaccess files that are in its sub directories. I'm using the argument --exclude .htaccess which is stopping all of the files from getting copied. The other arguments I'm including are -a --recursive --times --perms. Is it possible to configure rsync to do this? Edit: Here is my full command: rsync -a --recursive --times --perms \ --exclude prop_images --exclude tracking --exclude vtours \ --exclude .htaccess --exclude .htaccess_backup --exclude "*~" \ /home/user/dev_html/* /home/user/public_html/

    Read the article

  • please help!!! this plugin to exclude Pages from the Front Page does not work.

    - by souravran
    add_action('admin_menu', 'pag_admin_menu'); add_filter('wp_list_pages_excludes','exclude_PAG'); function pag_admin_menu() { add_options_page('Exclude', 'Exclude Page', 'administrator', 2, 'Pages'); } function Pages() { if( $_POST[ 'xclu_pag' ] ) { $message = process_PAG(); } $options = PAG_get_options(); ?> <div class="wrap"> <h2>Exclude Categories</h2> <?php //echo $message ?> <p>Use this page to select the pages you want to exclude.</p> <form action="" method="post"> <table width="960px"> <thead> <tr> <th scope="col">Category</th> <th scope="col" align="left">Exclude from Front Page.</th> </tr> </thead> <tbody id="the-list"> <?php //print_r( get_categories() ); $pags = get_pages(); //echo $pags; $temp_pag = 0; foreach( $pags as $pag ) { ?> <tr<?php if ( $temp_pag == 1 ) { echo ' class="alternate"'; $temp_pag = 0; } else { $temp_pag = 1; } ?>> <th scope="row"><?php echo $pag->post_title; ?></th> <td> <input type="checkbox" name="exclude_paggg[]" value="-<?php echo $pag->ID ?>" <?php if ( in_array( '-' . $pag->ID, $options['exclude_paggg'] ) ) { echo 'checked="true" '; } ?>/> </td> </tr> <?php } ?> </table> <p class="submit"><input type="submit" value="Save Changes" /></p> <input type="hidden" name="xclu_pag" value="true" /> </form> </div> <?php } function process_PAG() { if( !$_POST[ 'exclude_paggg' ] ) { $_POST[ 'exclude_paggg' ] = array(); } $options['exclude_paggg'] = $_POST[ 'exclude_paggg' ]; update_option('PAGExcludes', $options); $message_pag = "<div class='updated'><p>Excludes successfully updated</p></div>"; // return $message_pag; } function PAG_get_options() { $defaults = array(); $defaults['exclude_paggg'] = array(); $options = get_option('PAGExcludes'); if (!is_array($options)) { $options = $defaults; update_option('PAGExcludes', $options); } return $options; } function exclude_PAG($query_pag) { $options = PAG_get_options(); if ($query_pag-is_home) { $query_pag-set('pag', implode( ', ', $options[ 'exclude_paggg' ] ) ); } return $query_pag; } Where should I make any change to make it work to exclude pages from the front page..? INPUT WOULD BE GREATLY APPRECIATED....!! enter code here

    Read the article

  • Bash Script to Back Up Backs Up Itself

    - by Jay LaCroix
    I have the following bash script that creates a tar.gz of my filesystem on a Kubuntu PC. The problem is, that it also tries to backup the tar.gz backup file, even though I am storing the backup in /tmp and omitting /tmp from the backup. I am wondering why it's backing up the file in /tmp even though I told it not to. #!/bin/bash # init DATE=$(date +20%y%m%d) sudo tar -cvpzf /tmp/`hostname`_$DATE.tar.gz \ --exclude=/proc \ --exclude=/lost+found \ --exclude=/sys \ --exclude=/mnt \ --exclude=/media \ --exclude=/dev \ --exclude=/tmp \ --exclude=/home/jlacroix/Desktop \ --exclude=/home/jlacroix/Documents \ --exclude=/home/jlacroix/Music \ --exclude=/home/jlacroix/Pictures \ --exclude=/home/jlacroix/Projects \ --exclude=/home/jlacroix/Roms \ --exclude=/home/jlacroix/Videos \ --exclude=/home/jlacroix/.VirtualBox\ VMs \ --exclude=/home/jlacroix/.SpiderOak \ / scp /tmp/`hostname`_$DATE.tar.gz jlacroix@Pluto:/share/Recovery/Snapshots sudo rm /tmp/`hostname`_$DATE.tar.gz

    Read the article

  • How to handle these variables in rsync exclude file?

    - by linux
    I have an ignore file for rsync but I can't figure out how to ignore this string of file names and the username: backup/cpbackup/daily/username/homedir/mail/cur/1244452567.H511146P7355.dwhs45.dwhs.net,S=2161:2, backup/cpbackup/daily/username/homedir/mail/cur/1244455430.H516330P14494.dwhs45.dwhs.net,S=4062:2, I tried this: backup/cpbackup/daily/*/homedir/mail/cur/* and this: *.*.dwhs45.dwhs.* But of course that would be too easy. Basically I just want to not transfer all the mail in the /cur/ directory for all users to the backups.

    Read the article

  • Exclude category from Wordpress home page unless it belongs to another category

    - by sirlancelot
    I have multiple users adding content to restricted categories (using RoleScoper) in my Wordpress setup that don't show up on the homepage (custom template with query_posts()). I'm looking for a way to "promote" the submitted content to the homepage by adding it to another category. My loop code looks like this: <?php query_posts($query_string . '&cat=-37'); if (have_posts()): while (have_posts()): the_post(); ?> This will exclude all posts in category 37. However, even if I add the post to a different category it still gets excluded. Is there a way to exclude a post if it belongs to just that one category?

    Read the article

  • Exclude a sub directory in a protected directory

    - by user1351358
    I need to exclude protection on one of the folder inside a protected directory with .htaccess I put .htaccess in here: /home/mysite/public_html/new/administrator/.htaccess The directory need to be exclude from protection: /home/mysite/public_html/new/administrator/components/com_phocagallery/ My .htaccess file : AuthUserFile "/home/mysite/.htpasswds/public_html/new/administrator/passwd" AuthType Basic AuthName "admin" require valid-user SetEnvIf Request_URI "(/components/com_phocagallery/)$" allow Order allow,deny Allow from env=allow Satisfy any I tried but not working on my purpose. I suspect my path to the excluded directory may have some mistakes. Please advise me. Thanks.

    Read the article

  • Cygwin diff won't exclude files if a directory is included in the pattern

    - by Dean Schulze
    I need to do a recursive diff using cygwin that needs do exclude all .xml files from certain directories, but not from other directories. According to the --help option I should be able to do this with with the --exclude=PAT option where PAT is a pattern describing the files I want to exclude from the diff. If I do this: diff -rw --exclude="classes/Services.xml" the diff does not ignore the Services.xml file in the classes directory. If I do this diff -rw --exclude="Services.xml" the diff does ignore the Services.xml file in all directories. I need to do something like this: diff -rw --exclude="*/generated/resources/client/*.xml" to ignore all .xml files in the directory */generated/resources/client/. Whenever I add path information to the --exclude pattern cygwin does not ignore the file(s) I've specified in the pattern. Is there some way to make cygwin diff recognize a pattern that identifies certain files in certain directories? It seems to not be able to handle any directory information at all.

    Read the article

  • Linux Bash Script, Single Command But Multiple Lines?

    - by Jay LaCroix
    I have the following script I wrote by searching Google, and it backs up my Linux system to an archive: #!/bin/bash # init DATE=$(date +20%y%m%d) tar -cvpzf /share/Recovery/Snapshots/$HOSTNAME_$DATE.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media --exclude=/dev --exclude=/share/Archive / This works, but I am wondering if I can format the script to show the command over multiple lines, something like this, so it is easy to edit later: tar -cvpzf /share/Recovery/Snapshots/$HOSTNAME_$DATE.tar.gz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/media --exclude=/dev --exclude=/share/Archive / That way it is easier to read and edit later. Is it possible to format a Bash script this way?

    Read the article

  • How to exclude directories from Mozy custom backup sets using spotlight queries

    - by bromfiets
    I would like to create custom backup sets for Mozy which exclude certain directories. For example, I would like to backup my Itunes folder, but exclude all podcasts. I have created a backup set which searches in /Users/me/Music and used this query kMDItemPath == "*Podcasts*"wc to exclude all matching files. However, nothing matches. Queries which use the kMDItemFSName spotlight attribute work fine, but any query using kMDItemPath doesn't seem to work at all. What am I doing wrong?

    Read the article

  • Exclude pages from search results based on device class (mobile/desktop)

    - by user32224
    We're currently building a new responsive website. While working on the site map, we figured that we don't want to show certain sections on mobile devices. This can be easily done by hiding the navigation parts using CSS/media queries. However, the trouble is that the hidden sites would still show up in search engine results. If a user happens to click on one of these links she might happen to see a badly formatted page as we'd use desktop/tablet only code to show images and video. Is there any way influence the search engines to exclude certain pages if the search is done on a mobile device? Do search engines crawl pages once or with a device specific view twice? Could we set a noindex meta tag for a specific device class?

    Read the article

  • Django exclude(**kwargs) help

    - by shawnjan
    Hey guys/gals! I had a question for you, something that I can't seem to find the solution for... Basically, I have a model called Environment, and I am passing all of them to a view, and there are particular environments that I would like to exclude. Now, I know there is a exclude function on a queryset, but I can't seem to figure out how to use it for multiple options... For example, I tried this but it didn't work: kwargs = {"name": "env1", "name": "env2"} envs = Environment.objects.exclude( kwards ) But the only thing that it will exclude is the last "name" value in the list of kwargs. I understand why it does that now, but I still can't seem to exclude multiple objects with one command. Any help is much appreciated! Shawn

    Read the article

  • How do i make a system call to tar files(along with exclude tag) in Perl

    - by superstar
    This is the system call, i am making right now in perl to tar the files system("${tarexe} -pcvf $tarname $includepath") which works fine. $tarexe -> location of my tar.exe file $tarname -> myMock.tar $includepath -> ./input/myMockPacketName ./input/myPacket/my2/*.wav ./input/myPacket/my3 ./input/myPacket/in.html Now i want to exclude some files using exclude tag, which doesnot exclude the files system("${tarexe} -pcvf $tarname $includepath --exclude $excludepath") $excludepath -> ./input/myMockPacketName/my3 The same stament ${tarexe} -pcvf $tarname $includepath --exclude $excludepath works fine when i run it in the command line.

    Read the article

  • How to exclude results with get_object_or_404?

    - by googletorp
    In Django you can use the exclude to create SQL similar to not equal. An example could be. Model.objects.exclude(status='deleted') Now this works great and exclude is very flexible. Since I'm a bit lazy, I would like to get that functionality when using get_object_or_404, but I haven't found a way to do this, since you cannot use exclude on get_object_or_404. What I want is to do something like this: model = get_object_or_404(pk=id, status__exclude='deleted') But unfortunately this doesn't work as there isn't an exclude query filter or similar. The best I've come up with so far is doing something like this: object = get_object_or_404(pk=id) if object.status == 'deleted': return HttpResponseNotfound('text') Doing something like that, really defeats the point of using get_object_or_404, since it no longer is a handy one-liner. Alternatively I could do: object = get_object_or_404(pk=id, status__in=['list', 'of', 'items']) But that wouldn't be very maintainable, as I would need to keep the list up to date. I'm wondering if I'm missing some trick or feature in django to use get_object_or_404 to get the desired result?

    Read the article

  • Django excluding specific instances from queryset without using field lookup

    - by Agos
    Hi, I sometimes have the need to make sure some instances are excluded from a queryset. This is the way I do it usually: unwanted_instance = Mymodel.objects.get(pk=bad_luck_number) uninteresting_stuff_happens() my_results = MyModel.objects.exclude(id=unwanted_instance.id) or, if I have more of them: my_results = MyModel.objects.exclude(id_in=[uw_in1.id, uw_in2.id, uw_in3.id]) This 'feels' a bit clunky, so I tried if I was lucky: my_ideally_obtained_results = MyModel.objects.exclude(unwanted_instance) Which doesn't work. But I read here on SO that a subquery can be used as parameter for exclude. Am I out of luck? Am I missing some functionality (checked the docs, but didn't find any useful pointer)

    Read the article

  • Script launching 3 copies of rsync

    - by organicveggie
    I have a simple script that uses rsync to copy a Postgres database to a backup location for use with Point In Time Recovery. The script is run every 2 hours via a cron job for the postgres user. For some strange reason, I can see three copies of rsync running in the process list. Any ideas why this might the case? Here's the cron entry: # crontab -u postgres -l PATH=/bin:/usr/bin:/usr/local/bin 0 */2 * * * /var/lib/pgsql/9.0/pitr_backup.sh And here's the ps list, which shows two copies of rsync running and one sleeping: # ps ax |grep rsync 9102 ? R 2:06 rsync -avW /var/lib/pgsql/9.0/data/ /var/lib/pgsql/9.0/backups/pitr_archives/20110629100001/ --exclude pg_xlog --exclude recovery.conf --exclude recovery.done --exclude pg_log 9103 ? S 0:00 rsync -avW /var/lib/pgsql/9.0/data/ /var/lib/pgsql/9.0/backups/pitr_archives/20110629100001/ --exclude pg_xlog --exclude recovery.conf --exclude recovery.done --exclude pg_log 9104 ? R 2:51 rsync -avW /var/lib/pgsql/9.0/data/ /var/lib/pgsql/9.0/backups/pitr_archives/20110629100001/ --exclude pg_xlog --exclude recovery.conf --exclude recovery.done --exclude pg_log And here's the uber simple script that seems to be the cause of the problem: #!/bin/sh LOG="/var/log/pgsql-pitr-backup.log" base_backup_dir="/var/lib/pgsql/9.0/backups" wal_archive_dir="$base_backup_dir/wal_archives" pitr_archive_dir="$base_backup_dir/pitr_archives" timestamp=`date +%Y%m%d%H%M%S` backup_dir="$pitr_archive_dir/$timestamp" mkdir -p $backup_dir echo `date` >> $LOG /usr/bin/psql -U postgres -c "SELECT pg_start_backup('$backup_dir');" rsync -avW /var/lib/pgsql/9.0/data/ $backup_dir/ --exclude pg_xlog --exclude recovery.conf --exclude recovery.done --exclude pg_log /usr/bin/psql -U postgres -c "SELECT pg_stop_backup();"

    Read the article

  • Windows DIR listing switch to exclude files in hidden folders

    - by Jason
    I'm trying to get a list of files from a directory excluding files in hidden folders. With the following command, hidden folders are traversed even though I've set /A:-H to exclude hidden directories. Is there a different switch to stop them from being traversed too? dir "C:\SVN" /A:-H /w /b /s Alternatively, for this use case I know the name of the hidden folders I want to exclude, so if there is a way to exclude the folders by name ("\.svn\") that might have to suffice. Thanks!

    Read the article

  • Exclude a process from being listed in `top`

    - by warren
    Is it possible to exclude some processes from being reported by top? For example, I would like to exclude itself from its listing (ie, I don't want top to show in the process list). I would also like to be able to exclude processes that do not belong to the user running top (except for root). Is this possible? If so, how? If not, is there a similar tool that will do what I want (that does not involve running something like ps frequently).

    Read the article

  • grep --exclude/--include syntax (do not grep through certain files)

    - by Piskvor
    I'm looking for the string "foo=" (without quotes) in text files in a directory tree. It's on a common Linux machine, I have bash shell: grep -ircl "foo=" * In the directories are also many binary files which match "foo=". As these results are not relevant and slow down the search, I want grep to skip searching these files (mostly JPEG and PNG images): how would I do that? I know there are the --exclude=PATTERN and --include=PATTERN options, but what is the pattern format? manpage of grep says: --include=PATTERN Recurse in directories only searching file matching PATTERN. --exclude=PATTERN Recurse in directories skip file matching PATTERN. Searching on grep include, grep include exclude, grep exclude and variants did not find anything relevant If there's a better way of grepping only in certain files, I'm all for it; moving the offending files is not an option, I can't search only certain directories (the directory structure is a big mess, with everything everywhere). Also, I can't install anything, so I have to do with common tools (like grep or the suggested find). UPDATES: @Adam Rosenfield's answer is just what I was looking for: grep -ircl --exclude=*.{png,jpg} "foo=" * @rmeador's answer is also a good solution: grep -Ir --exclude="*\.svn*" "pattern" * It searches recursively, ignores binary files, and doesn't look inside Subversion hidden folders.(...)

    Read the article

  • Can I do filename pattern matching in a bash script?

    - by Bob Bowden
    Can I do filename pattern matching in a bash script? "test" is a directory with the following files ... bob@bob-laptop:~/test$ ls exclude exclude1 exclude2 include1 include2 from the command line, if I want to exclude some of the files, I can do ... bob@bob-laptop:~/test$ echo !(exclude*) include1 include2 but, if I put that command in a script (named exclude) ... bob@bob-laptop:~/test$ cat exclude echo !(exclude*) when I execute it, I get an error ... bob@bob-laptop:~/test$ ./exclude ./exclude: line 1: syntax error near unexpected token (' ./exclude: line 1:echo !(exclude*)' I've tried every (I think) variation of escaping some, all or none of the special characters and I still get an error. What am I missing here? If I can't do this, would someone please be so kind as to explain why?

    Read the article

  • How to Exclude an URL for Apache Mod_proxy?

    - by Mughil
    We have two Apache server as front-end and 4 tomcat server as back-end configured using mod_proxy module as load balancer. Now, we want to exclude an single tomcat url from the mod_proxy load balancer. Is there any way or rule to exclude? Proxy Balancer Setting: <Proxy balancer://backend-cluster1> BalancerMember http://10.0.0.1:8080 loadfactor=1 route=test1 retry=10 BalancerMember http://10.0.0.2:8080 loadfactor=1 route=test2 retry=10 </Proxy>

    Read the article

  • Exclude all hidden directories in UNIX find

    - by xRickerlx
    I'm doing a word search using the following command: find . -exec grep -q [some_word] '{}' \; -print -o -name .svn -prune -o -name .ssh -prune -o -name .boneyard -o -name log -prune -prune -o -name tmp -prune Is it possible to use a regex to exclude all hidden directories? Note: The current command traverses the entire tree from the current location and exclude those being pruned. The exclusion needs to work for any hidden directory regardless off location.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >