Ubuntu :: Make A Script That Makes A Tree Of All Folders And Subfolders And Outputs It To Either A .txt File Or .pdf?

Feb 25, 2011

Is it possible to make a script that makes a tree of all folders and subfolders and outputs it to either a .txt file or .pdf? All folders except from one shall list 2 levels. The except folder all the way.

View 3 Replies


ADVERTISEMENT

Programming :: Make A Binary Tree From An External File?

Dec 7, 2010

My assessment is making a tree from a text file as follows: -reading a file line by line

-making a binary tree from it
- traverse by level the binary tree
- posting the traversal result to the same file without overwriting the text file- it is required to be append to the bottom of the text file (i have to do this in 4 languages: c#,PHP from Xampp,java, python)

i read the file with this script in java:
public class FileToStringArray {
privateString strLine;
privateString[] stringArray;
privateFileInputStream in;

[Code]...

View 9 Replies View Related

Ubuntu :: List Folders And Subfolders With Size?

Jan 2, 2010

I want to list my folders and subfolders (recursive) and also show the size of the files in terminal. I started using this:

Code:
ls -h -R > /test.txt
I got everything but not the size of the folders.
Then I tried this:
Code:
du -h --max-depth=1 > test.txt

Suppose to show me everything, but I can't see subfolders. And this command do not accept recursive. How can I show the size of the files and folders like the second command, but including the subfolders?

View 5 Replies View Related

General :: Summarized Sizes Of Folders And Their Subfolders?

Jul 11, 2010

Let's say I want to get the size of each folder of a linux file system. When I use ls -la I don't really get the summarized size of the folders.If I use df I get the size of each mounted file system but that also doesn't help me. And with du I get the size of each subfolder and the summary of the whole file system.But I want to have only the summarized size of each folder within the ROOT folder of the file system. Is there any command to achiev that?

View 4 Replies View Related

General :: Get The Summarized Sizes Of Folders And Their Subfolders?

Aug 13, 2010

I want to get the size of each folder of a linux file system. When I use ls -la I don't really get the summarized size of the folders. If I use df I get the size of each mounted file system but that also doesn't help me. And with du I get the size of each subfolder and the summary of the whole file system. But I want to have only the summarized size of each folder within the ROOT folder of the file system. Is there any command to achieve that?

View 3 Replies View Related

General :: Moving Files From Folders And Subfolders To A Specific Folder?

Aug 21, 2010

I am using secure delete to remove files from a Debian Linux PC. However, secure delete does not remove folders. This has lead me to look at writing a script that would move files to a predetermined folder for deletion. My plan is as follows:I have a folder on my desktop called shredder where I move the contents of the waste bin to. The script needs to identify all files within the folders and sub folders, within the shredder folder, and move each file to the shredder folder and then delete the folder. At this point secure delete can be used with a command like shred -v -u *.*on the shredder folder.The problem I have is in creating the code to move files from the different folders and then deleting the folders. Note that the names of the files, folders and subfolders will not always be known

View 12 Replies View Related

General :: Change A String Recursively In Files Located In Folders And Subfolders?

Jul 22, 2011

lets say I have a project that have generated lots of xml files. Though all these xml files point to a location with the text name TEXT15. I want to change all the files that containts TEXT15 and change it to TEXT16. This actually works for files in a folder but not recursively in all the entire files....perl -pi -c 's/TEXT15/TEXT16/g' ./* but I have many subfolders and within this more subsub folders....i just want to do this recursively.

View 2 Replies View Related

Software :: Evolution Is Showing Hidden Files And Folders In Folder Tree

Oct 31, 2009

I am using evolution for my email client, and it shows me hidden files and folders in the folder tree. Basically, my email folder is in a unix folder on a system, and that system logs me into my folder when I try using evolution. The downside is that files like .bashrc, .bash_profile and other weird stuff end up in the foldertree view

See how the tree would show bashrc and .lynxrc?The folder "documents" shouldn't be showing either.Yeah, that's really annoying. It showing the contents of the $HOME folder that I login to.In thunderbird those things wouldn't show.It must be evolution specific.Anyone have an idea how to fix this issue?

View 1 Replies View Related

Fedora :: Chmod 666 Makes Files And Folders Invisible?

Mar 31, 2010

I have a separate data partition on my F12 box with one dir for my children and subdirs for each of them. because they had no rw- rights and because they sometimes use one of the other logins to work for school I changed the permissions for their dir so that anyone has access. I used

Code:

# chmod -R 666 [their directory]

after that Nautilus displayed an empty folder even with 'show hidden files' on.however, with

Code:

ls -lh

on the dir and subdirs all the files seem to be present (luckily).

1. what did I wrong?

2. how do I get the files back using Nautilus?

View 6 Replies View Related

OpenSUSE :: Cannot Make First Level Subfolders In KMail?

Dec 12, 2010

in Kmail 2.0.89 and the 2 or 3 versions before that, I have been lost theability to make a new subfolder under the category "KMail_Folders". I canonly make sub-subfolder under any existent one.The Add Folder entry in the menu is greyed when I am in the KMail Folders
level.Is that a bug or a feature? (I hope is not the latter...)

View 3 Replies View Related

Ubuntu :: Curl -K Command Outputs Weird Symbols Instead Of Downloading URL From File?

May 16, 2011

I'm on Ubuntu 11.04. I have read around about how to use curl to download a list of URLs from a text file, and everyone says to use

Code:
curl -K URLlist.txt This is what the curl man page says as well. However, for even a simple file with one URL, this command outputs a bunch of weird symbols for me instead of downloading the file. For example, I have a text file "test.txt" with one line in the following format:

Code:
url = "http://www.example.com/image.jpg" I use the curl command to download this file:

[Code]...

View 2 Replies View Related

Programming :: PHP Outputs Metadata Or File Information At The Top Of Its Output

Sep 10, 2010

Consider this PHP Script or just skip to the Output:

Code

Code:
-bash-2.05b# cat myDate.php
#!/usr/bin/php -q
<?php

[code]....

View 10 Replies View Related

Programming :: Pasting Multiple Cut Outputs To A Tab Delimited Output File?

Sep 4, 2010

I have a requirement like this:Cut the characters from each line of a file with following positions: 21-24, 25-34 ,111-120.Thse fields now need to be placed in a tab delimited output file.Currently this is how I am achieving it:

#!/bin/sh
cat newsmaple.txt | cut -c 21-24 > out1.txt
cat newsmaple.txt | cut -c 25-34 >out2.txt

[code]....

View 1 Replies View Related

General :: Multiple Grep Outputs Appended To Single Row Of CSV File?

Sep 12, 2010

how to update a series of values from multiple grep commands outputs to be appended to a single row of a csv file? Work on a linux envir. The values from grep output will be numeric values.

Output sold look like:

1,3,4,5,7,0,5

Each of these values will be odtained from multiple grep commands piped with wc -l Is it possible to update a single row of a csv file if so pleas ehelp me with the command to be used to redirect the output into the csv file

View 5 Replies View Related

General :: Make A Cronjob Who Makes A Tag.gz Of Everything Inside A Directory In A Recursive Way?

Mar 23, 2011

I would like to make a cronjob who makes a tag.gz of everything inside a directory in a recursive way. BUT there is a HUGE directory full of jpg's. I don't want this one in the backup.Additional points if it can backup symbolic links.

View 2 Replies View Related

General :: Curl -K Command Outputs Weird Symbols Instead Of Downloading URL From File?

May 16, 2011

I'm on Ubuntu 11.04. I have read around about how to use curl to download a list of URLs from a text file, and everyone says to use Code:curl -K URLlist.txt. This is what the curl man page says as well. However, for even a simple file with one URL, this command outputs a bunch of weird symbols for me instead of downloading the file.For example, I have a text file "test.txt" with one line in the following format:

Code:
url = "http://www.example.com/image.jpg"
I use the curl command to download this file:

[code]....

View 7 Replies View Related

Ubuntu :: Safe Way To Clean Up /lib File Tree?

Jan 3, 2011

Is there a safe way to cleanup the /lib file tree? Mines gotten too large for the filesystem it's on (/), and I've already shot myself in the foot a few times trying to delete things.

View 7 Replies View Related

General :: Copy A File To All Subfolders In A Directory Using A Single Command?

Jul 18, 2010

I'd like to copy a file, say widgets/water.txt, to all subfolders in the folder widgets using a single command. So if the folder widgets has 10 subfolders like widgets/blue, widgets/green, etc. I'd like to copy water.txt to all of them with one command.

I tried the commands

Code:

cp water.txt ./*/water.txt
cp water.txt ./*/

However these don't seem to work. The latter gives 'cp: omitting directory' errors.

View 7 Replies View Related

Ubuntu :: File Copy Via 9.10 On Windows Not Updating Directory Tree ?

Aug 19, 2010

I have ubuntu 9.10 & windows 7 on my laptop. I have one 40GB Primary partition (C & 60 GB logical partition on my windows. I have given another 20GB for ubuntu.

I hibernated my windows7 & then started ubuntu 9.10. Then I copied a folder containing some PDF files from my ubuntu to that 60GB (D on windows. Then I rebooted the machine & choose windows from GRUB. the windows came up from hibernation but nowhere I was able to see that folder which I copied.

Since ubuntu supports (understands) NTFS file system it means when I copied that folder it should have updated the Directory Tree of NTFS on that 60GB (D but that folder is not shown.

When I restart the windows the folder appears (ofcourse because windows checks the file system again for consistency while in hibernation it does not).

View 3 Replies View Related

Programming :: Expandable File Tree For Uploads?

Aug 18, 2010

I am working on a PHP enabled webpage that will allow a user to select multiple files and directories to upload from a local machine to an ftp server. I am comfortable with uploading the files from the machine to the server. The problem is making it easy to select all the desired files. What I would like to do is create an expandable file tree that lists all the directories and files on the local filesystem. From there, the user should be able to select directories and files using checkboxes. Upon clicking submit, all of the selected files should be fed into an array of files that can be sequentially uploaded to the ftp server.

View 1 Replies View Related

General :: Find A Phrase/word Recursivly In A File Tree?

Aug 31, 2010

how do I find a phrase/word recursively in a file tree in Linux?I tried find . -name ./* | grep my_phraseand I tried grep -r "register_long_arrays" *

View 5 Replies View Related

Applications :: Missing Tree View Option In Nautilus File Browser?

Sep 15, 2010

In the left pane of Nautilus File Browser, I can only display directory and file names. I don't have the button at the top of the pane which allows me to select an alternate view such as Tree view.

View 6 Replies View Related

Ubuntu :: Clipboard Sharing In Xephyr - Make A Live CD Which Makes Use Of Xephyr?

Mar 15, 2010

I am trying to make a Live CD which makes use of Xephyr. Xephyr seems to do the job I need, however it seems that I can't copy things from the rest of my windows to paste into the Xephyr window, and copy things out of the Xephyr window to paste into the rest of the windows.I have the live CD here [URL] , and if people using the live cd can not copy things into the Xephyr window, then I imagine it will be very frustrating to use.is there any way to share the clipboard between two Xservers? Any thing I am missing?

View 1 Replies View Related

Ubuntu Installation :: How Makes Larger 'file Systems' Using /etc/fstab

Mar 12, 2011

I have noticed the (understandable) tendency of new Linux users to think about disk drives in the 'Windows way'; their first thought is to exchange a new drive for an existing one, rather than combine both drives for a larger 'file system'.

There are times when replacing one drive with another is indeed the correct action (aging drive, failing drive, slow drive, etc). But in other cases it may be preferable to use the inherent strength of the fstab (file system table) file to combine physical drives to become a larger 'file system'.

Lets first look at a user with an 8 gig netbook who is running out of space. Rather than replace the 8 gig flash drive with a 32 gig device, the old and new devices can be combined to yield a 40 gig 'file system':

This same principle can be applied to a user with a computer using an 80 gig hard drive, and who 'adds' a new 320 gig drive instead of replacing the 80 gig drive with the 320 gig drive:

This same principle can also be applied to building a massive 'file system' without the requirement of using RAID:

The above 12 terabyte system can be built using a basic motherboard with four open SATA ports and four 3tb hard drives. No server based equipment is needed; no raid hardware or software is required. This is just something that Linux does (and does very well).

View 2 Replies View Related

Fedora :: Fstab Ext3 F11 - Automatically Mount The Drive In File Tree At The Location /mnt/TheDrive?

May 15, 2010

With a 1Tb USB drive plugged in, we'll call it "TheDrive", I boot my machine and "TheDrive" is mounted automatically. The icon is on the desk-top. "TheDrive" mounts to /media/TheDrive. Everything is fine. But, I would like to automatically mount the drive in my file tree at the location /mnt/TheDrive. I would not like to have the drive automatically mounted to /media/ and appear on the desktop. I know that this requires the use of fstab; but, I do not know what to add to this file.

[Code]...

View 14 Replies View Related

Red Hat / Fedora :: Makfile Which Can Compile A Tree For Source File And Create Output In Separate Directory

Jul 29, 2010

I am new to linux platform and my requirment is to write a makfile which can compile a tree for source file and create the output in separate directory .

View 1 Replies View Related

Ubuntu :: Make With Make File Yields Error - /usr/bin/javac: Cannot Execute Binary File

Nov 17, 2010

When I try to compile some Java code on Ubuntu 10.10 (kernel 2.6+) using make and a Makefile.

I get an error indicating that the make utility cannot execute the java compile command (javac).

The error reads: /bin/bash: line 6: .: /usr/local/jdk1.5.0_18/bin/javac: cannot execute binary file

I am executing make as root. I have enabled permissions on all directories in the path /usr/local/jdk1.5.0_18/bin/javac and on javac itself.

I get this error whether using a jdk installed via ubuntu apt-get, or whether I install the jdk myself. And I get it using either Java 1.5 or 1.6

My machine has an 80386 processor. I notice the make utility is built for i686-pc-linux-gnu

However, I can manually compile using javac.

I can compile calling javac from within a bash script.

I can compile using the java compiler gcj from the command line: gcj --main=HelloWorld HelloWorld.java -o HelloWorld.exe

But I cannot compile java code from the makefile. Any reasons why I might be getting this error?

View 4 Replies View Related

General :: Make And Sh Commands - Make A File Called File Roller For Ubuntu 9.10

Apr 6, 2010

I want to make a file called file roller for Ubuntu 9.10. The folder has a file called install.sh and some others that are make.

I figure first I need to make a file and then run install.sh to install. But I don't know how to do this.

View 2 Replies View Related

General :: Creating XSession File Makes StartX Go Black

May 28, 2011

I want to put:
xmodmap -e "pointer =3 2 1"
somewhere in the startup. It seems creating an .xsession is the solution. But after I create a .xsession file in my home folder, the next time I run startx the screen just turns black. (And only for a short while can I switch to another virtual terminal, before that too becomes impossible). After deleting the file it runs OK again. I'm not using any login/desktop manager. I use IceWM on Debian Squeeze. Is there some script/import that has to be present in the .xsession file, or is something else going on? Also I'd like to know what I should do when I get a black screen. Turning off the PC is such a crude method

View 11 Replies View Related

Software :: Use Sed To Include A Text File In The Beginning Of Other Text Files Inside A Folder And Its Subfolders?

Jun 1, 2010

Can I use sed to include a text file in the beginning of other text files inside a folder and its subfolders? So it should be recursive.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved