list only files or folders

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting list only files or folders
# 1  
Old 01-18-2008
Data list only files or folders

Hi experts,

i wanna to list either file or folder.
please help me

Thanks (in advance)

# 2  
Old 01-18-2008
pl clear about ur question...??
# 3  
Old 01-18-2008
Question list files or folders

Thanks for reply

there are 6 files & 9 folder in my /home/jag/ folder

so when i am running command this command to list files

#find *.txt or find *.*

then it shows 5 out off 6 files i want see all files

second when i m running this command to view all folders

#ls --hide=*.*
it shows all folder excluding one which named as jag12.11.2007

i want to view files & folders

again thanks for reply

Please help me
# 4  
Old 01-18-2008
ls -l | grep ^d -> this will list all the directories

ls -l |grep ^- -> thils will list all regular files
# 5  
Old 01-18-2008
Bug :b:Thanks a lot quintet

Thanks a lot
problem has been solved

can u tell me whts use of " ^ " (meaning)

again thanks
# 6  
Old 01-18-2008
^ means beginning with
# 7  
Old 01-18-2008

Originally Posted by quintet
^ means beginning with
Thanks for express reply

can i add u in my buddy list? Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash to list all folders in a specific directory

The below bash is trying to list the folders in a specific directory. It seems close but adds the path to the filename, which basename could strip off I think, but not sure why it writes the text file created? This list of folders in the directory will be used later, but needs to only be the... (5 Replies)
Discussion started by: cmccabe
5 Replies

2. Shell Programming and Scripting

How to copy files/folders and show the files/folders?

Hi, So i know we use cp -r as a basic to copy folders/files. I would like this BUT i would like to show the output of the files being copied. With the amazing knowledge i have i have gone as far as this: 1) find source/* -exec cp -r {} target/ \; 2) for ObjectToBeCopied in `find... (6 Replies)
Discussion started by: Imre
6 Replies

3. Shell Programming and Scripting

List all the files in the present path and Folders and subfolders files also

Hi, I need a script/command to list out all the files in current path and also the files in folder and subfolders. Ex: My files are like below $ ls -lrt total 8 -rw-r--r-- 1 abc users 419 May 25 10:27 abcd.xml drwxr-xr-x 3 abc users 4096 May 25 10:28 TEST $ Under TEST, there are... (2 Replies)
Discussion started by: divya bandipotu
2 Replies

4. UNIX for Dummies Questions & Answers

Searching for folders/parent folders not files.

Hello again, A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x. I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies

5. Shell Programming and Scripting

get a list of folders and find files older than...

I am trying to get a list of folders contained in a given directory and would then like to delete any folders/files older than 60mins. So far I am able to get the list of folders using: ls -l /home/uploads | grep '^d.*' the output: drwxr-xr-x 6 flk flk 4096 2010-02-11 13:30... (2 Replies)
Discussion started by: flk
2 Replies

6. UNIX for Dummies Questions & Answers

List files and folders

Hi, How do I simply get a list of all files and folders in a directory with their asscoiated absolute path and then append it to a file? I need the path to be associated to each and every file/folder. I have tried the usual ls command but it simply just gives a list of names per absolute... (6 Replies)
Discussion started by: cyberfrog
6 Replies

7. Shell Programming and Scripting

Delete file from list of folders

Hi all, I amd new in UNIX programming. I have a query. I need to delete some files (like .dec files) from some folders. I have a list of folders. What will be command for it. Please help me. Thanks in Advance. (3 Replies)
Discussion started by: eclairs
3 Replies

8. Shell Programming and Scripting

Help needed to transfer list of files to FTP server, to different folders

Hello Unix Gurus, Help required from you. My requirement is something like this I want to create a concurrenct program in Oracle Applications using shell script to transfer files from Apps Server to destination FTP server. I have created custom program, where I will extract all the... (4 Replies)
Discussion started by: amazon
4 Replies

9. Shell Programming and Scripting

List Files & Folders created/modified

Hello people, I want to list the files & folders created/modified since a particular date say June 2006. I know I can list recursively thru the folders and use awk to extract the date column to get the desired output. Just wanted to check whether there is an easier way to do this. Please... (2 Replies)
Discussion started by: tipsy
2 Replies

10. Shell Programming and Scripting

list folders but not symbolic links

Hii... I want to list folders (no files and no symbolic links).. But my is giving me error.. please help... Esham (7 Replies)
Discussion started by: esham
7 Replies
Login or Register to Ask a Question