10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Find all files in the current directory only excluding hidden directories and files.
For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided.
`find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Discussion started by: ksailesh1
7 Replies
2. Shell Programming and Scripting
Hi,
I have to find files only in the current directory...not in the sub directories.
But when I use Find command ... it searches all the files in the current directory as well as in the subdirectories. I am using AIX-UNIX machine.Please help..I tried to use maxdepth..but it is not working in AIX. (2 Replies)
Discussion started by: vsachan
2 Replies
3. HP-UX
I am trying to compile a file called PPFormatageMUT.c in which I have included header file which are at some other location but the point is that while compiling the file, it is throwing error saying that
error : no such file or directory
source code location:... (1 Reply)
Discussion started by: ezee
1 Replies
4. Shell Programming and Scripting
Hello all,
I am having a hard type in figuring out how to only gather certain files in the current directory without exploring its subdirectories.
I tried:
find . -name "*.ksh" -prune
this also returns ksh files from lower subdirectories.
I also tried
find . -ls -name "*.ksh"
This also... (8 Replies)
Discussion started by: gio001
8 Replies
5. Shell Programming and Scripting
I am trying to use a loop to strip of the funny character ^M at the end of all lines in each file found in current directory and I have used the following in a script:
find . -type f -name '*.txt' | while read file
do
echo "stripping ^M from ..."
ex - "$file" > $tempfile
%s/^M//g
wq!
# mv... (4 Replies)
Discussion started by: bisip99
4 Replies
6. Shell Programming and Scripting
Hello,
Using the instruction mget (within ftp) and with "Interactive mode off", I want to get all files from directory (DirAA), but not the files in sub-directories.
The files names don't follow any defined rule, so they can be just letters without (.) period
Directory structure example: ... (0 Replies)
Discussion started by: Peter321
0 Replies
7. UNIX for Dummies Questions & Answers
I can't manage to list all files that are not directories from current directory. (2 Replies)
Discussion started by: beni22sof
2 Replies
8. Shell Programming and Scripting
Hi Gurus,
I have a directory A, which has some 0 byte files in it.
This directory also has a subdirectory B which also has some 0 byte files in it.
The problem:
I only need to find out the names of the 0 byte files in the directory A.
I'm using the following command
find . -name *.zip... (6 Replies)
Discussion started by: ramky79
6 Replies
9. Shell Programming and Scripting
May be a simple question for experts here....
I need to get the list of files older than 30 days in the current folder. I tried "find", but it searches recursively in all the sub directories.
Can I restrict the recursive search and extract the files only from current directory ? (18 Replies)
Discussion started by: cxredd4
18 Replies
10. Shell Programming and Scripting
i have a problem that needs to be solved with CSH , SED or AWK as soon as possible.
I need to write a program which creates a directory called backup (if it does not exist). The program then compares all the ordinary files in the current directory and if two files are identical, it moves one of... (1 Reply)
Discussion started by: tkwai
1 Replies