1- search $dir_find for \*.txt\*
2- exclude 2 directories $dir_find/abc/* and $dir_find/fit*
3- compress find result
4- move all compressed file to different directory
Here is what I have tried. How/where can I add mv?? Can I add to same line/command?
Thanks in advance.
Moderator's Comments:
Use code tags, thanks. See PM.
Last edited by zaxxon; 01-20-2012 at 07:42 PM..
Reason: code tags
Is it possible for find to match on multiple arg's. Basically, I would like to be able to match on name and atime. Basically I want something like:
find . -atime +31 <AND> -name *.log -exec rm -f {} \;
Thanks (2 Replies)
:D i am looking through the man pages of the find command and I have found the -printf and fprintf section.. .
I tried this command and got an error
find -follow -newer 'date.file' -printf %f file1
i keep getting a %f in directory listing and no input into file1
according to the manpages %f... (2 Replies)
im doing a script to compress files in ${CompressPath} withe files older than ${FileAge}. The line below actually works, but I only need to compress files that are in ${CompressPath}. This line compresses all files that it can find under the ${CompressPath} and all its sub dirs. is there a way to... (6 Replies)
I have a file, but I don't know this file is stored in which directory, if I use 'find' command to search this file, is it work?
which option I use?
find filename? (2 Replies)
I have noticed while Compressing certain .tar files using Compress.exe, sometimes the Compressed version is bigger than the original which causes the Compressed version to be deleted. Is this normal behavior? (5 Replies)
Not sure if I'm missing it, but I'm looking on the find man page, but can't find it.
Here is what I'm doing
find . -name "log_*" -type f -mtime +8 -exec rm {} \;
How do I tell man to find all files matching that pattern, but only ones that end with a numeric character. I thought it was... (4 Replies)
Hi!
First off I'd like to stress that I'm a true dummy :)
I have a website with SSH access and since it has user generated content I want to backup my website every day end send it through FTP to a different server. I got it working for my mysql database, so the only thing remaining are the... (2 Replies)
Hi All !
We have to compress a big data file in unix server and transfer it to windows and uncompress it using winzip in windows.
I have used the utility ZIP like the below.
zip -e <newfilename> df2_test_extract.dat
but when I compress files greater than 4 gb using zip utility, it... (4 Replies)
hey guys!
I need to find in a specific directory and its sub-directories a file thats passed has a argument, and print it has like a ls -l command! the problem is how do i print has a ls command but instead only the file name in the end, also the directory where its insered!
ex:
Want... (2 Replies)
Hi,
Is there an option to run ls to only show files owned by the current user? Currently doing ls | awk | grep for the user.
If I use find and -user ${username}, I am getting Permission denied messages on some directories and am currently re-directing those messages as 2>/dev/null. Is that... (2 Replies)
Discussion started by: newbie_01
2 Replies
LEARN ABOUT V7
dh_compress
DH_COMPRESS(1) Debhelper DH_COMPRESS(1)NAME
dh_compress - compress files and fix symlinks in package build directories
SYNOPSIS
dh_compress [debhelperoptions] [-Xitem] [-A] [file...]
DESCRIPTION
dh_compress is a debhelper program that is responsible for compressing the files in package build directories, and makes sure that any
symlinks that pointed to the files before they were compressed are updated to point to the new files.
By default, dh_compress compresses files that Debian policy mandates should be compressed, namely all files in usr/share/info,
usr/share/man, files in usr/share/doc that are larger than 4k in size, (except the copyright file, .html and other web files, image files,
and files that appear to be already compressed based on their extensions), and all changelog files. Plus PCF fonts underneath
usr/share/fonts/X11/
FILES
debian/package.compress
These files are deprecated.
If this file exists, the default files are not compressed. Instead, the file is ran as a shell script, and all filenames that the shell
script outputs will be compressed. The shell script will be run from inside the package build directory. Note though that using -X is a
much better idea in general; you should only use a debian/package.compress file if you really need to.
OPTIONS -Xitem, --exclude=item
Exclude files that contain item anywhere in their filename from being compressed. For example, -X.tiff will exclude TIFF files from
compression. You may use this option multiple times to build up a list of things to exclude.
-A, --all
Compress all files specified by command line parameters in ALL packages acted on.
file ...
Add these files to the list of files to compress.
CONFORMS TO
Debian policy, version 3.0
SEE ALSO debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh@debian.org>
11.1.6ubuntu2 2018-05-10 DH_COMPRESS(1)