Sponsored Content
Top Forums Shell Programming and Scripting List all the files in the present path and Folders and subfolders files also Post 302647293 by divya bandipotu on Monday 28th of May 2012 03:15:49 AM
Old 05-28-2012
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
Code:
$ 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 two more folders TEST/Exec and TEST/Exec/Result.

Now I need Output like:

Code:
-rw-r--r-- 1 abc users 419 May 25 10:27 abcd.xml
TEST:
total 8
drwxr-xr-x 2 abc users 4096 May 25 11:44 Exec
-rw-r--r-- 1 abc users 540 May 25 10:28 xyz.xml
 
TEST/Exec:
total 4
-rw-r--r-- 1 abc users 3765 May 25 10:23 tc
drwxr-xr-x 2 abc users 4096 May 25 12:44 Result
TEST/Exec/Result:
-rw-r--r-- 1 abc users 3765 May 25 10:23 results


Note: I have tried ll * and ll*/* but didn't worked

Thanks in advance..

Last edited by Franklin52; 05-28-2012 at 09:45 AM.. Reason: Please use code tags for data and code samples, thank you
 

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Dummies Questions & Answers

Basic Q: getting list of all files of type within folder & subfolders

A painfully rudimentary UNIX question for somebody. I've been puzzling over this for the last hour but can't find the right command. I'm simply trying to get a list of all files - and their full paths - within a folder & subfolders which have extension .php and .js. That's it! No amount of... (1 Reply)
Discussion started by: AtomicPenguin
1 Replies

3. Shell Programming and Scripting

list only files or folders

Hi experts, i wanna to list either file or folder. please help me Thanks (in advance) :confused:Jagannath (6 Replies)
Discussion started by: jagnikam
6 Replies

4. 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

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. Shell Programming and Scripting

Script to list files not present in audio.txt file

I am having following folder structure. /root/audios/pop /root/audios/jazz /root/audios/rock Inside those pop, jazz, rock folders there are following files, p1.ul, p2.ul, p3.ul, j1.ul, j2.ul, j3.ul, r1.ul, r2.ul, r3.ul And I have a file named as "audio.txt" in the path /root/audios,... (11 Replies)
Discussion started by: gopikrish81
11 Replies

7. Shell Programming and Scripting

Help to move folders, subfolders and files from unix to windows

Hi Unix Gurus, I am able to copy only files that exist in the parent folder. My parent folder has sub folders and within sub folders there are lots files. I need to copy folder, sub folders and files from Unix to the remote windows SFTP location. The directory structure is something like... (1 Reply)
Discussion started by: shankar1dada
1 Replies

8. Shell Programming and Scripting

How to copy all the contents of a list of files present in a folder to a particular file?

Hi All, I want to copy all the contents of a list of files in a folder to a particular file. i am using following command: cat dir/* >> newFile.txtIt's not working. Could you please help? Thanks, Pranav (3 Replies)
Discussion started by: Pranav Bhasker
3 Replies

9. UNIX for Beginners Questions & Answers

Find for files within a list of subfolders

Helo Is there a better way to search within a list of subfolders : A_START_PATH="/data_1/data_2" # # dir2, dir3, dir6, ..... dir59 exists # A_LIST="$A_START_PATH/dir1 $A_START_PATH/dir4 $A_START_PATH/dir5" find "$A_LIST" -type f -name"*.txt" Now searching for all files in any subdirs... (2 Replies)
Discussion started by: jcdole
2 Replies

10. UNIX for Beginners Questions & Answers

Command to change add permissions for a new user to all files in all subfolders and folders

Hi there! I'm new to Unix and haven't done command line stuff since MS-Dos and Turbo Pascal (hah!), I would love some help figuring out this basic command (what I assume is basic). I'd like to add a User to the permissions of all files in a folder and all files in all subfolders, as well... (9 Replies)
Discussion started by: Janjbrt
9 Replies
ElixirFM::Exec(3pm)					User Contributed Perl Documentation				       ElixirFM::Exec(3pm)

NAME
ElixirFM::Exec - Interface to the ElixirFM executable REVISION
$Revision: 946 $ $Date: 2010-04-12 21:27:23 +0200 (Mon, 12 Apr 2010) $ SYNOPSIS
use ElixirFM::Exec; # 'elixir' will be tried out use ElixirFM::Exec '.'; # './elixir' will be invoked use ElixirFM::Exec './elixir'; # './elixir' will be invoked use ElixirFM::Exec 'some/other'; # 'some/other/elixir' unless # 'some/other' is executable ElixirFM::Exec::elixir 'help'; import ElixirFM::Exec 'other/elixir'; # switching to 'other/elixir' ElixirFM::Exec::elixir 'inflect', ['(1320,1)'], "V[PI]---3MS--", "N------P-[IRD]"; ElixirFM::Exec::inflect ['(1320,1)'], "V[PI]---3MS--", "N------P-[IRD]"; DESCRIPTION
The ElixirFM::Exec module provides a simple interface for invoking the ElixirFM executable, which you need to install on your system yourself. The download and further information are at http://sourceforge.net/projects/elixir-fm/ <http://sourceforge.net/projects/elixir-fm/>. AUTHOR
Otakar Smrz "<otakar smrz mff cuni cz>", <http://ufal.mff.cuni.cz/~smrz/> COPYRIGHT &; LICENSE Copyright (C) 2005-2010 Otakar Smrz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. perl v5.12.3 2011-06-13 ElixirFM::Exec(3pm)
All times are GMT -4. The time now is 09:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy