LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2012, 09:30 AM   #1
trampman
LQ Newbie
 
Registered: Mar 2012
Posts: 1

Rep: Reputation: Disabled
list files -> size on server


Hi all im trying to export a list of all files including their full file path and size to a csv so I can then put it into a db to work on. does anyone know how?

thanks
 
Old 03-09-2012, 10:19 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,885

Rep: Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258Reputation: 4258
Quote:
Originally Posted by trampman View Post
Hi all im trying to export a list of all files including their full file path and size to a csv so I can then put it into a db to work on. does anyone know how?

thanks
What have you done/tried so far?? What information do you need in the CSV, and how are you trying to split it? The question is a bit vague. Read the man page on find. Something like
Code:
find . -ls | sed -e 's/  */,/g' > file.csv
...from the / directory (as root) will do it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to list true size of files with holes bigteks Linux - Server 3 08-11-2011 06:38 PM
[SOLVED] looking for a way to list files sorted by size mark_alfred Linux - General 4 08-22-2009 09:20 AM
how to create a list of files and folders (name and size only) rastiazul Linux - General 16 11-04-2008 03:14 PM
Howto? List all files in all directories ordered by size? rusty_turkey Linux - Newbie 2 06-17-2008 07:55 PM
How do I produce sorted list of files in current directory over a certain size? bangback Linux - Newbie 3 10-25-2006 12:11 AM


All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration