Sponsored Content
Top Forums Shell Programming and Scripting How to list all the files, directories and sub-directories in the current path except one directory? Post 302700343 by Manjunath B on Thursday 13th of September 2012 09:43:49 AM
Old 09-13-2012
hmm.. not working.. its displaying all the files in log folder. there are some millions of it.
 

10 More Discussions You Might Find Interesting

1. Solaris

shell-init: could not get current directory: getcwd: cannot access parent directories

Hello root@ne-ocadev-1:/root/scripts>su espos -c find /a35vol100/ESPOS/oracle/db/9.2.0/oradata/ESPOS/archive -type f -atime +10 -exec ls {} shell-init: could not get current directory: getcwd: cannot access parent directories: Permission denied find: insufficient number of... (6 Replies)
Discussion started by: babu.knb
6 Replies

2. Shell Programming and Scripting

Recursive call to find files and directories in Shell script from current path.

################################################################ Copy this script to your path from where you want to search for all the files and directories in subdirectories recursively. ################################################################# code starts here... (2 Replies)
Discussion started by: Ramit_Gupta
2 Replies

3. UNIX for Dummies Questions & Answers

List files that are not directories from current directory

I can't manage to list all files that are not directories from current directory. (2 Replies)
Discussion started by: beni22sof
2 Replies

4. Shell Programming and Scripting

mget * (obtein files from current directory but not the files form sub-directories)

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

5. UNIX for Dummies Questions & Answers

List directories and sub directories recursively excluding files

Hi, Please help me, how to get all the direcotries, its sub directories and its sub directories recursively, need to exclude all the files in the process. I wanted to disply using a unix command all the directories recursively excluding files. I tried 'ls -FR' but that display files as... (3 Replies)
Discussion started by: pointers
3 Replies

6. Emergency UNIX and Linux Support

List matching directories in current folder only on AIX

Hi, I need to find the list of matching direcories in current folder only and no subfolders on AIX.I tried -maxdepth option but its not working. Also, tried ls -d option to list the matching directories but getting argument list too long... So, any help would be appreciated. (6 Replies)
Discussion started by: sachinkl
6 Replies

7. Shell Programming and Scripting

Find specific files only in current directory...not sub directories AIX

Hi, I have to find specific 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 am using the below command. And i am... (2 Replies)
Discussion started by: aakishore
2 Replies

8. UNIX for Advanced & Expert Users

Find all files in the current directory excluding hidden files and directories

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

9. Shell Programming and Scripting

Finding non-existing words in a list of files in a directory and its sub-directories

Hi All, I have a list of words (these are actually a list of database table names separated by comma). Now, I want to find only the non-existing list of words in the *.java files of current directory and/or its sub-directories. Sample list of words:... (8 Replies)
Discussion started by: Bhanu Dhulipudi
8 Replies

10. UNIX for Beginners Questions & Answers

List all files and directories in the current directory separated by commas and sorted by crtime

What I know so far: ls -A will list all files except those starting with a dot ls -d will list all directories ls -m will separate contents by commas For getting crtimes use: stat filename will give me the inode number or ls -i filename will give... (13 Replies)
Discussion started by: chstewar
13 Replies
whereis(1)						      General Commands Manual							whereis(1)

NAME
whereis - Locates files for programs SYNOPSIS
whereis [-bms] [-u] [-BMS directory... -f] program... The whereis command locates source, binary, and/or reference page files for the specified program program. OPTIONS
The -b, -m, and -s options can be used in combination to restrict the search. Searches for an executable program. Searches for the refer- ence page for a program. Searches for the sources of a program. Use the -B, -M, and -S options to change or limit the places whereis searches. Specifies the binary directories to search. Specifies the reference page directories to search. Specifies the source directories to search. The other options that can be used with whereis are as follows: Terminates the last directory list and signals the start of program names. Used with other options to indicate when there is no file for program in the default or specified directory or directories (source, binary, or reference page). DESCRIPTION
The whereis program locates source, binary, and reference pages for the specified programs. When looking for a match, the program names are stripped of leading pathname components and any trailing extensions of the form (for example, s. resulting from the use of the Source Code Control System see sccs(1), are also handled. The default directories searched by the whereis command are as follows: /etc /etc/nls /sbin /usr/bin /usr/lbin /usr/lbin/spell /usr/ccs/lib /usr/lib /usr/local /usr/hosts /usr/sbin EXAMPLES
To find files matching cat in the default source, binary, and reference directories, enter: whereis cat To search for reference pages for app13 in the directory /usr/local/man, enter: whereis -M /usr/local/man -f -f appl3 To find the programs in /usr/bin that do not have ref- erence pages in /usr/share/man/man1 with source files in /usr/src/cmd, enter: whereis -u -M /usr/share/man/man1 -S /usr/src/cmd -f /usr/bin/* To find which files in the current directory either have no reference pages in the default reference directories or have more than one, enter: whereis -m -u * FILES
Default binary directories. Default binary directories. Default reference directories. Default source directories. SEE ALSO
Commands: apropos(1), find(1), man(1), which(1), catman(8) whereis(1)
All times are GMT -4. The time now is 05:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy