I have a directory which contains files with different kinds of extensions .everyday a file with .log gets added to it .i want to extract the file with .log extension which is created with todays date .
thanks in advance (2 Replies)
I have a directory MYDIR
In which i have several directories 1,2,3,4....
Now, In each of these directories i have several files a.dat, b.dat, c.dat, d.dat.....
MYDIR
----1
---------a.dat
---------b.dat
---------c.dat
---------d.dat
----2
---------a.dat
---------b.dat
---------c.dat... (2 Replies)
Hi, I have a directory PRIVATE in which I have several directories and each of these have several files. Therefore, I need to find those files by size and date to back up those files in another directory.
I don't know how to implement this shell script using ''find''.
appreciate any... (1 Reply)
hi guys,
Suppose you have 100 files in a folder and you want to replace all occurances of a word say "ABCD" in those files with "DCBA", how would you do
it ???
jatin (13 Replies)
Hi Experts,
I am trying to write a shell script that should
1. Find files with name (ab030.txt,Ab030.TXT,AB030.TXT,ab030.TXT,AB030.txt)
2. If any of the above found, rename it to AB030.TXT
Thanks. (4 Replies)
Hi. I have a problem that i can't seem to resolve. I need to create a script that list all the files, that are found recursively, with the same name.
For example if a file exists in more than one directory with the same name it list all the files that he founds with all the info. Could someone... (5 Replies)
Hello all,
I am in need of assistance in creating a script that will remove a specified block of text from multiple .htaccess files. (roughly 1000 files)
I am attempting to help with a project to clean up a linux server that has a series of unwanted url rewrites in place, as well as some... (4 Replies)
Hi friends.. I have many dirs in my working directory. Every dir have thousands of files (.jsp, .java, .xml..., etc). So I am working with an script to find every file recursively within those directories and subdirectories ending with .jsp or .java which contains inside of it, the the pattern... (3 Replies)
Hi,
I have the shell script requirement mentioned below :
List all java and c files or all files in directory and sub directories' in folder structure in current dir.
then search for pattren1 in all files globally and replace with other string .
And also check the date... (3 Replies)
Hi all,
i am new to this forum, unix and shell scripting.
I would really appreciate if you all can help me here..
I have files coming in the below format
'filename20513'13May06:03:45
filename are characters..
like 'ABDDUT20513'13May06:03:45
i need it to be renamed as... (17 Replies)
Discussion started by: khman
17 Replies
LEARN ABOUT DEBIAN
dpkg-name
dpkg-name(1) dpkg utilities dpkg-name(1)NAME
dpkg-name - rename Debian packages to full package names
SYNOPSIS
dpkg-name [option...] [--] file...
DESCRIPTION
This manual page documents the dpkg-name program which provides an easy way to rename Debian packages into their full package names. A full
package name consists of package_version_architecture.package-type as specified in the control file of the package. The version part of the
filename consists of the upstream version information optionally followed by a hyphen and the revision information. The package-type part
comes from that field if present or fallbacks to deb.
OPTIONS -a, --no-architecture
The destination filename will not have the architecture information.
-k, --symlink
Create a symlink, instead of moving.
-o, --overwrite
Existing files will be overwritten if they have the same name as the destination filename.
-s, --subdir [dir]
Files will be moved into a subdirectory. If the directory given as argument exists the files will be moved into that directory oth-
erwise the name of the target directory is extracted from the section field in the control part of the package. The target directory
will be `unstable/binary-architecture/section'. If the section is not found in the control, then `no-section' is assumed, and in
this case, as well as for sections `non-free' and `contrib' the target directory is `section/binary-architecture'. The section field
isn't required so a lot of packages will find their way to the `no-section' area. Use this option with care, it's messy.
-c, --create-dir
This option can used together with the -s option. If a target directory isn't found it will be created automatically. Use this
option with care.
-?, --help
Show the usage message and exit.
-v, --version
Show the version and exit.
EXAMPLES
dpkg-name bar-foo.deb
The file `bar-foo.deb' will be renamed to bar-foo_1.0-2_i386.deb or something similar (depending on whatever information is in the
control part of `bar-foo.deb').
find /root/debian/ -name '*.deb' | xargs -n 1 dpkg-name -a
All files with the extension `deb' in the directory /root/debian and its subdirectory's will be renamed by dpkg-name if required
into names with no architecture information.
find -name '*.deb' | xargs -n 1 dpkg-name -a -o -s -c
Don't do this. Your archive will be messed up completely because a lot of packages don't come with section information. Don't do
this.
dpkg-deb --build debian-tmp && dpkg-name -o -s .. debian-tmp.deb
This can be used when building new packages.
BUGS
Some packages don't follow the name structure package_version_architecture.deb. Packages renamed by dpkg-name will follow this structure.
Generally this will have no impact on how packages are installed by dselect(1)/dpkg(1), but other installation tools might depend on this
naming structure.
SEE ALSO deb(5), deb-control(5), dpkg(1), dpkg-deb(1), find(1), xargs(1).
Debian Project 2012-04-15 dpkg-name(1)