03-03-2009
I have not tried anything because I dont know where to start.
I will try to get something done when I get home tonight, however, if you could give me some examples or quick scripts it would be cool later I could use them as reference or maybe just go ahead and use them.
Any help will be trully appreciated!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to print to file , a listing of all files below a certain directory.
Example: I need to print to file a listing of all files below the etc dir (including the subdirectories) with their full path. Any ideas on how to do this with one command. Or is this something I need to do on all... (4 Replies)
Discussion started by: gforty
4 Replies
2. Shell Programming and Scripting
Hi all,
My goal is to find all my 'man' dirs in my sw structure and from that create a windex db. I get many new software dirs every week soo I need to rebuild the windex db very often. I've started with this:
OS: Solaris 8
#!/bin/bash
find /sw/tools -type d -name 'man*' -print
... (3 Replies)
Discussion started by: tonlu
3 Replies
3. UNIX for Dummies Questions & Answers
Hey guys,
I would like to find all files which contain "client1.dat". I would like to search from the current directory and all subs and print out all the files that have this. Any help would be greatly appreciated.
Thanks much. (10 Replies)
Discussion started by: ecupirate1998
10 Replies
4. Shell Programming and Scripting
Hey all.. This should be simple but stoopid here can't get head around it! I have many directories, say 100 each with many files inside. I need a script to traverse through the dirs, find most recent file in each dir and add it to a tar file.
I can find the files with something like
for... (1 Reply)
Discussion started by: bobdung
1 Replies
5. Shell Programming and Scripting
I'm sure this has been asked before but I couldn't find it with the search. I have a script that looks for files and then moves to another location for further processing. My problem is I can't seem to prune the .s* directories. It doesn't break anything just wanted a cleaner process.
Here... (4 Replies)
Discussion started by: jcalisi
4 Replies
6. OS X (Apple)
Hi, i am asking a command to find a string in file(s) from multiple level directory structures.
help would be really appreciated. (4 Replies)
Discussion started by: ywu081006
4 Replies
7. Shell Programming and Scripting
I have lots of directories in ~/.
My diaries are stored in directories in ~/ containing exactly 4 digits.
How do I use the /usr/bin/find command to only search my diary directories?
So I would like my search to include ~/2009/abc/def and ~/2010/2001/33 but not ~/103/ or ~/20101/ or ~/201/... (2 Replies)
Discussion started by: siegfried
2 Replies
8. Emergency UNIX and Linux Support
Hi Experts,
I want to find all the dirs , subdirs on the sever which start with "sr".
Can anyone let me know command for the same.
find . -type d -name sr* I tried this but it is not working.
Thanks,
Ajay (4 Replies)
Discussion started by: ajaypatil_am
4 Replies
9. UNIX for Dummies Questions & Answers
Hi,
My first time on this site, please excuse me if I've come to the wrong forum. I'm fairly new to Unix/Linux and hoping you can help me out.
I'm looking for a command line that will return a list of directories that are larger than 50M and older than 2 days.
I thought it may be... (6 Replies)
Discussion started by: Wisconsingal
6 Replies
10. Shell Programming and Scripting
I am trying to find a way to move files into corresponding date files.
i=0
while read line
do
array="$line"
(( i++ ))
done < <(ls)
cd $(echo ${array})
echo ${array}}
pwd
#cd "$(array}"
] || mkdir 2015
cd "2015"
] || mkdir 02-February
] || mkdir 03-March
] || mkdir... (10 Replies)
Discussion started by: newbie2010
10 Replies
LEARN ABOUT CENTOS
sd_readahead
SD_READAHEAD(3) sd_readahead SD_READAHEAD(3)
NAME
sd_readahead - Control ongoing disk boot-time read-ahead operations
SYNOPSIS
#include "sd-readahead.h"
int sd_readahead(const char *action);
DESCRIPTION
sd_readahead() may be called by programs involved with early boot-up to control ongoing boot-time disk read-ahead operations. It may be
used to terminate read-ahead operations in case an uncommon disk access pattern is to be expected and hence read-ahead replay or collection
is unlikely to have the desired speed-up effect on the current or future boot-ups.
The action should be one of the following strings:
cancel
Terminates read-ahead data collection, and drops all read-ahead data collected during this boot-up.
done
Terminates read-ahead data collection, but keeps all read-ahead data collected during this boot-up around for use during subsequent
boot-ups.
noreplay
Terminates read-ahead replay.
RETURN VALUE
On failure, these calls return a negative errno-style error code. It is generally recommended to ignore the return value of this call.
NOTES
This function is provided by the reference implementation of APIs for controlling boot-time read-ahead and distributed with the systemd
package. The algorithm it implements is simple, and can easily be reimplemented in daemons if it is important to support this interface
without using the reference implementation.
Internally, this function creates a file in /run/systemd/readahead/ which is then used as flag file to notify the read-ahead subsystem.
For details about the algorithm check the liberally licensed reference implementation sources:
http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c and
http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h
sd_readahead() is implemented in the reference implementation's drop-in sd-readahead.c and sd-readahead.h files. It is recommended that
applications consuming this API copy the implementation into their source tree. For more details about the reference implementation, see
sd-readahead(3)
If -DDISABLE_SYSTEMD is set during compilation, this function will always return 0 and otherwise become a NOP.
EXAMPLES
Example 1. Cancelling all read-ahead operations
During boots where SELinux has to relabel the file system hierarchy, it will create a large amount of disk accesses that are not necessary
during normal boots. Hence it is a good idea to disable both read-ahead replay and read-ahead collection.
sd_readahead("cancel");
sd_readahead("noreplay");
SEE ALSO
systemd(1), sd-readahead(3), daemon(7)
systemd 208 SD_READAHEAD(3)