General :: Finding All Files Starting With A .
Nov 29, 2010To find all files recursively starting with a . (period), is the following OK:
find ./ -name '.'*
To find all files recursively starting with a . (period), is the following OK:
find ./ -name '.'*
how to find total size of all files whose names starting with a
OS: SunOS
du -h a* is giving individual file sizes.
find commands starting with a given letter like for example 's'?
View 6 Replies View RelatedI have a situation where a directory has about 1.5 million files in it. On an hourly basis, I want to be able to find any files that have changed in the last hour, compress them, encrypt them and then copy them to both a local backup machine and an off site backup.
Is there any kind of utility or kernel module that creates some type of log of modified files? I know I can use find, but the search for -mtime in this directory takes quite a while and will not suffice for an hourly backup.
i am a newbie in linux ,i am writing a bash script to identify the files which are exactly 7 days ( a week old) i tried this command find /var/backup -mtime +7 -exec ls -d {} ;but this gives me even the files which are older than 7 days
[root@proxy access]# find . -mtime +7 -exec ls -d {} ;
./access.log.1.gz
./access.log.2.gz
[code]...
I am looking for this `struct messages_sdd_t` and I need to search through a lot of *.c files to find it.However, I can't seen to find a match as I want to exclude all the words 'struct' and 'messages_sdd_t'. As I want to search on this only 'struct messages_sdd_t' The reason for this is, as struct is used many times and I keep getting pages or search results.The directory I am searching in, has another directories so it will have to search recursively.I have been doing this without success:Code: find . -type f -name '*.c' | xargs grep 'struct messages_sdd_t'and thisCode: find . -type f -name '*.c' | xargs egrep -w 'struct|messages_sdd_t'
View 3 Replies View RelatedRistretto is starting with my Xubuntu... My pc has only 125MB of RAM... Is there a command to prevent ristretto of starting with the system? Are there any other ways to let my xubuntu faster?
View 3 Replies View Relatedgive me a script for copying all the files in a directory that are not directories to another directory. May be this could work:
Code:
FILE=(ls -l|grep ^-)
for i in $FILE
do
cp $i /destination/path/$FILE
done
I'm wondering if you can share some tips in regards to finding .conf files in programs when installing using package managers. I'm scratching my head on the fact that when you install a program through yum/apt-get, I don't know what and where the software is being installed at. In Windows, I know that when it installs an application, it goes into the Program Files directory, it's that simple.I know Linux has predefined directories for applications but sometimes it installs configuration files in /etc or some other locations in /usr which I have a tough time sifting through.
Is there a way to trace what .conf or any files for that matter which relates to what software that needs it? It's just hard for me to understand what file relates to what application at the moment. As much as I would like to learn more about Linux, this process for me takes up alot of time. I hope you can help me out on this one.
Assumed y directory structure looks as follow:
Code:
--root
-- dir1
-- dir1-1
-- dir2
-- dir2-1
-- dir2-2
And under each sub dir there are some log files ended with .log. Now I want to list all these log files. How to to that?
I know find can do what I am looking for, but I am wondering if there is an alternative way to find files on the filesystem either created before/after a certain point, or at a certain time.
Typically I rely on updatedb & locate for most of my file searching needs. Issues with those tools, though, are that it only has directory and file names, and it only creates a database of local directories, not anything mounted via CIFS|NFS or via -o loop (eg, .iso images).
So if I need to find files created after yesterday across the entire system (local and remote filesystems), I am currently needing to use find.
What other tools, if any, would accomplish this in a similar fashion?
I have tried ls and grep, but that requires (in my attempts so far) multiple searches:
ls -lR | grep Aug | grep 10
ls -lR | grep Aug | grep 11
My collection contains some MP3s which have some glitches like
displaying the wrong duration on loading
minor jumps
suddenly ending despite the duration claims another minute remaining
noise
I'm looking for a tool that can detect as many of these glitches as possible and fix those that can be fixed (obviously e.g. noise can not simply be eliminated in most cases).
I have a website that has a massive list of royalty free stock photos and I want to download all of them. I have bought a membership for [URL] so I am able to download as much as I want from them for the next month.
Instead of going page by page and manually downloading each set of stock photos manually, I would like to automate this process. Here's my idea:
1. Download the website with the links to hotfile [URL]
2. Use grep to retrieve all the links to [URL]
3. Feed the links I recieve from grep into wget and download the works of them.
The problem I'm getting is when I use grep, It retrieves the entire line of html code where "hotfile.com" is shown. So here is an example of one link I receive in the output:
Quote:
./1776-santa-claus-vector-set.html:<div align="center"><a href="http://hotfile.com/dl/18418176/181a55b/Santa_Claus_Vector_Set.rar.html" target="_blank">HotFile</a></div>
Is there a way to just have the link shown in the output?
PS: I have everything else working, I just need an automated process of getting all the links.
how to find a file with a ctime older than. let's say, 5 seconds? What I would like to do is to move all "new" files in a specific folder but not files that has not yet finished uploading.
View 1 Replies View RelatedI've got a quick grep question. I'm trying to work out a command I can use to locate all of the files in a directory that have sql database connection details. I want to do it by looking for the strings "localhost" and the name of the database.find . -type f -exec grep -l -E '^(localhost|DATABASE_NAME)' {} ;
View 4 Replies View RelatedWhat GUI Linux programs are there for finding files based upon their contents?
View 5 Replies View RelatedI have been using Linux close to 2 years now. One thing that always bewildered me is audio support in Linux. These days I login to windows only for listening to music. After reading various blogs, i decided to give it a try in Linux with Amarok. There again I am facing a problem.
while i try to scan for music files it is not finding any files.
what I did is as follows:
Quote:
Setting --> configure Amarok --> collection --> scan
I have tried with mp3 .wma format files. While I try to add these files individually, Amarok is able to play those.
I am using Amarok 2.3.2 with KDE 4.4.5. Fedora - 12 is my flavor.
Given below is the log obtained with amarok -debug option
Quote:
TagLib: MPEG::Header:arse() -- First byte did not match MPEG synch.
TagLib: MPEG::Header:arse() -- Invalid sample rate.
TagLib: A frame of unsupported or unknown type 'TSC' has been discarded
TagLib: A frame of unsupported or unknown type 'TSC' has been discarded
TagLib: A frame of unsupported or unknown type 'TSC' has been discarded
[Code].....
I copied a back up of my windows 'my documents' fold and all of its' sub folders into my linux (Mint Debian) Documents directory. I found that many of my files can be found in more that one directory so, what I want to do is to find all the dups and deal with them. Is there a good linux application to resolve this 'duplicates' problem. (I don't want to touch the linux system files.)
View 2 Replies View RelatedHow to find a file which is being written recently in directory of 1000 files?
View 8 Replies View RelatedI am looking for Windows Search equivalent looking for file name patterns (not file contents but file names)....
I am aware of "globbing" and wildcard recursive search functionality in ls but I am still not capable of finding files under directories.
for example: I want to find all files starting with a string lsnr* under root directory / and any sub-directories.....
ie I want to look for files like lsnr*.* anywhere under / and any sub-directories under / such as /dir1/dir2/dir4 and dir1/other/dir/someotherdir/sub-dir etc.
so if I have /dir1/lsnrcontrol and also have /dir1/dir/2/dir3/lsnr-tinit.dat then I want to list the files names etc.
how to do this using ls -R and wildcards.
Ive been using linux for a while but I am just getting into shell scripting, im currently trying to get a simple script for finding and copying files powered by the command:
Code:
This works fine from the command line but when put in a script such as:
Code:
Code:
with the keyboard inputs for $fc1 and $fc2 being *.doc and ~/test respectivly. The only problem i can see is the xargs -ivar "var" part possibly needing $var to be defined?
is there a recursive shell or Perl script to delete files with the same name as the parent folder? i wish to include the starting folder name as argument to the script.
View 2 Replies View RelatedA function by name abc is called in many files. I want to copy all the lines with the function call to an output file.A simple grep on function name doesn't help me as the function call is spanning across multiple lines as follows:
abc(parameter1,
parameter2,
parameter3);
So I want to copy all the three lines (till semicolon) to the output file.The problem is because there are more than 200 calls for the same function and I cannot do it manually
Is there a cc cleaner equivalent for linux to clear out tmp, internet files, etc.?
View 9 Replies View RelatedIs there a program for Ubuntu that converts AVI files to VOB files? This is the only type of file that will burn to a DVD and successfully play on my DVD player. I can use DVD Flick on Windows but I'm sure this can't be the only way. There has to be a way to get VOB files on an Ubuntu operating system.
View 4 Replies View RelatedHow do I find files with wildcardnames in it ?
For eg:
If i have files called, "hello123", "hello?","hello1" and "hellohoware" in the system and I want to list only the file "hello?" with the "find" command, how do I do it ?
find / -name hello? doesn't work as expected and also lists "hello1". I don't want "hello1" to be listed ...how do I list only "hello?" ?
Where does x2go log the time at date of client logins? or dosnt it log anything? i have searched far and wide, and even contacted the x2go dev mailing list, but i have found no answer anywhere.
View 1 Replies View RelatedI have is that I can't update anything at all, my update manager isn't working because I created a few internet files in my /etc/ somewhere so that I could use the internet through a wingate network and now I need to get rid of those files because I'm on a direct connection now. I'm running Intrepid Ibex. .
View 8 Replies View Relatedwere do i get the .dev files for libx264 0.98 i think is the version it is asking for.I install the latest libx264 from git or does that install the .dev file also.
View 3 Replies View RelatedI have several text files that list hundreds or thousands of words each. I need to find the intersect of each of these sets. (i.e. print only lines that occur in each file) Is there a CLI utility that can do this?
View 3 Replies View Related