Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How do I delete all files except one of a certain extension? Post 302561305 by lsteamer on Monday 3rd of October 2011 07:53:42 PM
Old 10-03-2011
How do I delete all files except one of a certain extension?

Let's say I wanna Delete all the files of a certain extension exept one.
How do I do it?

I know, if you wanna delete them all is with the command:

find ~/ -type f -iname '*.txt' -exec rm {} ~/ ';'

But If I want to keep an Specific file? Let's say I wanna keep 'Log.txt'. How do I do it?
 

10 More Discussions You Might Find Interesting

1. HP-UX

Files without extension

I am brand new to hp unix systems. I see some files without extension on this system. If I type name of the file it shows me so many detail but does not take me back to command prompt. What are these files and how do I come back to command prompt? Please help (1 Reply)
Discussion started by: rajahindustani
1 Replies

2. Shell Programming and Scripting

gzip files with extension

Hi, I have 1000 of files in a folder with the file extension as .csv In this some of the files are already zipped and its looks like filename.csv.gz Now i need to zip all the files in the folder to free some disk space. When i give gzip *.csv It prompts me to overwrite filename.csv.gz... (5 Replies)
Discussion started by: nokiak810
5 Replies

3. UNIX for Dummies Questions & Answers

copying files of certain extension?

Hi, I am using scp to copy a certain directory over the network. This folder contain some files that I am not interested in. My question is; is it possible to copy files of certain extension only, keeping the same directory hierarchy as it is (that is sub-folders)? Thanks (8 Replies)
Discussion started by: faizlo
8 Replies

4. UNIX for Dummies Questions & Answers

How to list files with no extension together with *.prog files?

Hi, I know that to list files with no extension, we can use.. ls -1 | grep -v "\." And to list .prog files, we can use.. ls -1 *.prog or ls -1 | grep '.prog$' (4 Replies)
Discussion started by: adshocker
4 Replies

5. Shell Programming and Scripting

Delete all files with specific extension in directory tree

I'm sure this has been asked many times, but a search didn't turn up a definitive best method for this (if there ever is such a thing). I have been using rsync to back up my main data directory, but I have accumulated a large number of older backups that I don't need. All of the files I don't... (14 Replies)
Discussion started by: LMHmedchem
14 Replies

6. Shell Programming and Scripting

Copy files with extension .sh

Hi all... I am trying to copy all my shell script to some directory using following command, I want to simplify it by not using awk..please some one help me.... find -name "*.sh" | awk -F"/" '{a=$NF;gsub(".sh",x,a);cmd="cp"" " $0" ""/home/akshay/MY_ALL/"a"_"++i".sh";system(cmd)}' (3 Replies)
Discussion started by: Akshay Hegde
3 Replies

7. Shell Programming and Scripting

Python - glob () - How to grep same files with different extension files

Hi I Have a directory and i have some files below abc.txt abc.gif gtee.txt ghod.pid umni.log unmi.tar How can use glob function to grep abc files , i have created a variable "text" and i assigned value as "abc", please suggest me how can we use glob.glob( ) to get the output as below... (2 Replies)
Discussion started by: kumar85shiv
2 Replies

8. Shell Programming and Scripting

Script needed to delete to the list of files in a directory based on last created & delete them

Hi My directory structure is as below. dir1, dir2, dir3 I have the list of files to be deleted in the below path as below. /staging/retain_for_2years/Cleanup/log $ ls -lrt total 0 drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2 drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies

9. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

Hi All, I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing. 1.I need to display the .done files from the directory. 2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory ... (2 Replies)
Discussion started by: girija.g6
2 Replies

10. Shell Programming and Scripting

Delete all files of a particular name & extension except one file.

I wish to delete all files that starts with "body<any number of digits>.xml" except body65.xml on Linux 7 bash shell So, from the below files body64.xml body.sh body65.xml body655.xml body565.xml body66.xml hello65.xml My command should delete all files except the below. body.sh... (2 Replies)
Discussion started by: mohtashims
2 Replies
BUILDD.CONF(5)							   Debian sbuild						    BUILDD.CONF(5)

NAME
buildd.conf - configuration file for buildd DESCRIPTION
buildd.conf is a Perl script which is sourced by buildd to permit configuration. It is run in a sandbox and restricted to setting a small number of variables, detailed below, which may be set to configure the behaviour of buildd. Each variable has an internal name, shown in all caps, and a perl variable showing the default setting. Note that the internal name is not accessible within buildd.conf; only the variable may be assigned. Also note that some of the defaults are set to be unique for each build, and so some of the defaults shown here are unique to the user and system used to build sbuild, and will be different for your system. While buildd permits many aspects of its behaviour to be configured, this should not normally be required. The defaults should be adequate for most uses, and should only be changed if you are doing something more advanced, or have specialist requirements. CONFIGURATION
Build environment PATH STRING type. PATH to set when running dpkg-buildpackage. Default: $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games'; Build options BUILD_ARCH STRING type. Build architecture (Arch we are building on). Default: $build_arch = 'amd64'; DISTRIBUTION STRING type. Default distribution. By default, no distribution is defined, and the user must specify it with the -d option. How- ever, a default may be configured here if desired. Users must take care not to upload to the wrong distribution when this option is set, for example experimental packages will be built for upload to unstable when this is not what is required. Default: $distribution = undef; DISTRIBUTIONS ARRAY:HASH:SCALAR type. List of distributions that buildd should take packages from Example: $distributions = [ { # name of the suite to build (also used to query wanna-build) dist_name => ["unstable", "testing"], # architecture to be built (will be passed to sbuild and can be # used to compute wanna_build_db_name built_architecture => undef, # host on which wanna-build is run wanna_build_ssh_host => "buildd.debian.org", # user as who we are going to connect to the host running wanna-build wanna_build_ssh_user => "buildd_arch", # SSH control socket path for ssh -S option wanna_build_ssh_socket => "", # Additional SSH options used when connecting wanna_build_ssh_options => [], # database used for wanna-build wanna_build_db_name => "arch/build-db", # Username to use for wanna-build. wanna_build_db_user => $Buildd::username, # Local queue directory where binaries are stored before uploaded # by dupload. You need to configure this directory in # @upload_queues to get packages uploaded from there. dupload_local_queue_dir => "upload", # list of packages which shouldn't be picked up by buildd no_auto_build => [], # list of packages which should only be taken if there absolutely # nothing else to do (probably packages included in no_auto_build # because they take too long) weak_no_auto_build => [], # regex used to filter out unwanted packages: #no_build_regex => "^(contrib/|non-free/)?non-US/", # regex used to filter packages to build: #build_regex => "", # mail addr of buildd admin handling packages from this distribution logs_mailed_to => $admin_mail, # schroot name (or alias) of the chrooted environment to use for # building (will be passed to sbuild). sbuild's default is # the first of $distribution-$arch-sbuild, $distribution-sbuild, # $distribution-$arch and $distribution. sbuild_chroot => undef, } ]; HOST_ARCH STRING type. Host architecture (Arch we are building for) Default: $host_arch = 'amd64'; NICE_LEVEL NUMERIC type. Nice level to run sbuild. Dedicated build daemons should not be niced. Default: $nice_level = 10; Daemon DAEMON_LOG_FILE STRING type. Main buildd daemon log file Default: $daemon_log_file = '/tmp/buildd/daemon.log'; DELAY_AFTER_GIVE_BACK NUMERIC type. Time to avoid packages that have automatically been given back by sbuild (in minutes) Default: $delay_after_give_back = 480; IDLE_SLEEP_TIME NUMERIC type. Time to sleep when idle (in seconds) between wanna-build --list=needs-build calls) Default: $idle_sleep_time = 300; MIN_FREE_SPACE NUMERIC type. Minimum free space (in KiB) on build filesystem Default: $min_free_space = 51200; NO_DETACH BOOL type. Disable becoming a daemon, for debugging purposes. Set to 1 to stop daemonising, otherwise set to 0 to become a daemon. Default: $no_detach = 0; PIDFILE STRING type. PID file to identify running daemon. Default: $pidfile = '/tmp/buildd/build/buildd.pid'; SHOULD_BUILD_MSGS BOOL type. Should buildd send "Should I build" messages? Default: $should_build_msgs = 1; Logging options DEBUG NUMERIC type. Debug logging level Default: $debug = 0; VERBOSE NUMERIC type. Verbose logging level Default: $verbose = 0; Mail ADMIN_MAIL STRING type. email address for admin Default: $admin_mail = 'root'; ERROR_MAIL_WINDOW NUMERIC type. If more than five error mails are received within the specified time (in seconds), do not forward (to avoid possible mail loops) Default: $error_mail_window = 28800; LOG_QUEUED_MESSAGES BOOL type. Log success messages from upload queue daemon? Default: $log_queued_messages = 0; Programs APT_GET STRING type. Path to apt-get binary Default: $apt_get = 'apt-get'; MAILPROG STRING type. Program to use to send mail Default: $mailprog = '/usr/sbin/sendmail'; SSH STRING type. Path to ssh binary Default: $ssh = 'ssh'; SUDO STRING type. Path to sudo binary Default: $sudo = 'sudo'; Uploader UPLOAD_QUEUES ARRAY:HASH:SCALAR type. Package upload queues Example: $upload_queues = [ { # Local queue directory where binaries are stored before uploaded # by dupload. dupload_local_queue_dir => "upload", # Upload site for buildd-upload to pass to dupload(1); see # /etc/dupload.conf for possible values. dupload_archive_name => "anonymous-ftp-master", }, { # Local queue directory where binaries are stored before uploaded # by dupload. dupload_local_queue_dir => "upload-security", # Upload site for buildd-upload to pass to dupload(1); see # /etc/dupload.conf for possible values. dupload_archive_name => "security", } ]; Watcher BUILD_LOG_KEEP NUMERIC type. Number of days until build logs are archived Default: $build_log_keep = 2; DAEMON_LOG_KEEP NUMERIC type. Number of days until old daemon logs are archived in a .tar.gz file Default: $daemon_log_keep = 7; DAEMON_LOG_ROTATE NUMERIC type. Number how many days until daemon logs are rotated (one is kept as daemon.log.old, others are moved to old-logs and gzipped) Default: $daemon_log_rotate = 1; DAEMON_LOG_SEND BOOL type. email rotated daemon logs to the admin? Default: $daemon_log_send = 1; NO_WARN_PATTERN STRING type. Don't complain about old files if they match the regexp. Default: $no_warn_pattern = '^build/(SKIP|REDO|SBUILD-GIVEN-BACK|buildd.pid|[^/]*.ssh|chroot-[^/]*|current-[^/]*)$'; PKG_LOG_KEEP NUMERIC type. Number of days until to package logs are archived Default: $pkg_log_keep = 7; STATISTICS_MAIL STRING type. email address for statistics summaries Default: $statistics_mail = 'root'; STATISTICS_PERIOD NUMERIC type. Period for statistic summaries (days) Default: $statistics_period = 7; WARNING_AGE NUMERIC type. Age (in days) after which a warning is issued for files in upload and dirs in build Default: $warning_age = 7; wanna-build client BUILT_ARCHITECTURE STRING type. Architecture for database Default: $wanna_build_built_architecture = 'amd64'; WANNA_BUILD_DB_NAME STRING type. Database name Default: $wanna_build_db_name = undef; WANNA_BUILD_DB_USER STRING type. Database user Default: $wanna_build_db_user = 'pbuilder'; WANNA_BUILD_SSH_HOST STRING type. Host for SSH connection Default: $wanna_build_ssh_host = ''; WANNA_BUILD_SSH_OPTIONS ARRAY:STRING type. SSH options. Note this is an array reference. Default: $wanna_build_ssh_options = []; WANNA_BUILD_SSH_SOCKET STRING type. Socket for SSH connection Default: $wanna_build_ssh_socket = ''; WANNA_BUILD_SSH_USER STRING type. Username for SSH connection Default: $wanna_build_ssh_user = ''; FILES
/etc/buildd/buildd.conf Configuration, maintained by the system administrator. This may be used to override the defaults. ~/.builddrc User-specific configuration. AUTHORS
Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>. sbuild is based on debbuild, written by James Troup <james@nocrew.org> and has been modified by Ben Collins <bcollins@debian.org>, Ryan Murray <rmurray@debian.org>, Francesco Paolo Lovergine <frankie@debian.org>, Michael Banck <mbanck@debian.org>, and Roger Leigh <rleigh@debian.org> COPYRIGHT
Copyright (C) 1998-2000 Roman Hodek <roman@hodek.net> Copyright (C) 1998-1999 James Troup <troup@debian.org> Copyright (C) 2003-2006 Ryan Murray <rmurray@debian.org> Copyright (C) 2001-2003 Rick Younie <younie@debian.org> Copyright (C) 2003-2004 Francesco Paolo Lovergine <frankie@debian.org> Copyright (C) 2005 Michael Banck <mbanck@debian.org> Copyright (C) 2005-2009 Roger Leigh <rleigh@debian.org> SEE ALSO
buildd(1), sbuild(1), Version 0.63.2 18 Aug 2012 BUILDD.CONF(5)
All times are GMT -4. The time now is 03:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy