Ubuntu :: Collapsing The Contents Of Sub Folders Into The Parent Folder Via Terminal?

Aug 4, 2011

I have a parent folder, with a lot of sub folders. basically, i'd like to bring all the contents from the sub folders into the parent folder, and subsequently delete the sub folders. is there one command for this? or do i need to cp -r over and over again, and then manually delete?

View 1 Replies


ADVERTISEMENT

General :: Command Line - Move Folder Contents Into Parent Folder

Jun 11, 2010

I have a folderA that contains folderB that contains a lot of files. I would like to get rid of folderB, but not its contents. I want those contents to be inside of folderA. How can I accomplish this on the commandline?

View 2 Replies View Related

General :: Copy Folder Hierarchy / Recreate All Folders From One Directory Without Copying Over Contents Of Folder?

Jul 2, 2010

Is there a way to recreate all the folders from one directory to another without copying over the contents of the folder? I've been trying to do something like this,

Code:for i in `ls $X`; do mkdir $PATH/$i; doneUnfortunately $i is deliminated by whitespaces in the filenames and not the actual folders.

$X contains only other folders so I dont have to worry about regular files but any kind of more "advanced" solution would work.

View 1 Replies View Related

General :: Compress .gz Folder With All Contents Inside Sub-folders / Images?

Oct 5, 2010

How can i compress to .gz my folder public_html:

media/sda7/user1/public_html/

I want all files and folders and subfolders and images and everything inside of public_html. Also to be saved on the same folder so i can find it easy How can i do it?

View 4 Replies View Related

Ubuntu :: Deleting Folder And Its Contents From Terminal / Sending Permission Error?

Jun 10, 2010

how do i delete a folder and its contents from terminal? when i tried to delete the folder it returns a- permission error,,-

View 2 Replies View Related

General :: Copy A Set Of Sub Folders From Their Multiple Parent Directories To A New Location

Nov 5, 2010

I am attempting to copy a set of sub folders from their multiple parent directories to a new location.

For example, I have three folders to copy:

I would like them to be copied to:

In actuality there are many folders besides folder1, folder2, folder3, and no numerical order exists. So, the folder named 'photos' would be copied to its parent folder's name in a new location. I would need this to occur for all folders in the '/home/user' directory.

View 6 Replies View Related

Ubuntu :: Folder Customization - Put A Different Image On Each Folder To Represent The Contents

Jan 3, 2010

I have a bunch of folders with different stuff in them. I would like to be able to put a different image on each folder to represent the contents.

View 8 Replies View Related

Ubuntu :: Where Is My Parent Folder

Jul 26, 2010

Where is my parent folder?

View 1 Replies View Related

Ubuntu Servers :: Show Folder Contents In Another Folder?

Feb 2, 2011

can i use one samba share with a folder showing the contents of another directory.shortcuts don't work on non ubuntu systems and it won't resolve links to files no on the share

View 5 Replies View Related

Ubuntu :: Can't Navigate To Parent Folder In Nautilus?

Feb 5, 2010

I used to be able to open any folder in Nautilus and from there navigate to the parent folder. There was this arrow pointing up that had this function but I don't have the option any more.

View 9 Replies View Related

Ubuntu :: Keep Files, Remove Parent Folder?

May 7, 2011

Im pretty new to linux and Ive hit a wall. I have a folder 'forum'. I need all files and subfolders but I dont want them in forum. I have tried it with the gui, but it wont let me paste them. How do I move all the folder data without moving the folder itself via terminal?

View 4 Replies View Related

Ubuntu :: Cp - Copy Only The Folder Contents To New Folder ?

Feb 21, 2010

I should know this but I figured I'd ask before I screw something up.

What is the command to cp just and only the contents of a folder, not the folder itself, into a new folder?

Code: cp -R /path/to/folder/ /to/new/folder/

Is this right?

View 6 Replies View Related

Ubuntu :: Displaying Folder Contents In Another Folder?

Jul 26, 2010

Is there a way to essentially make all of one folders content as a system link in another folder (I have "My Documents" on my external and my computer, they have different things, I'd like to have one "My Documents" which shows both contents and hide the other two

View 3 Replies View Related

OpenSUSE :: Zip A Folder But Not Include It's Parent Directories?

May 11, 2011

I use "zip -r" to zip the following folder:

/root/Desktop/administration/backup

....My only grip is that when you open the zip file, the parent directories are there too.

So within the zip file I have to navigate through "/root/Desktop/administration" just to get to the directory called backup.

Is there a way for me to zip the directory backup, and not include the parent directories? I want to be able to open the zip file and see only the backup directory listed.

View 9 Replies View Related

Ubuntu :: Inherit Parent Folder Permissions When Copying Files ?

Mar 28, 2011

I do have an Ubuntu Headless server which is running Samba on it. My mp3 file collection resides on that server on is being share.

So far, no problems connecting to that drive and writing from my Windows box on that share. But if I use my main laptop, which runs Ubuntu Lucid and download an mp3 song from Amazon, the moment I move that to the share, I got permissions problems from the Windows machine. This is clearly a permission issue with group and others; the song is being created on the share without read and write permissions to others or the samba group I created.

My question is. How can I make this process simple or automatic, when moving songs to the share? I don't want to go there everytime and run ...

Code:

Which was basically how I reset or fixed the problem.

I've read about umask, but not sure if that applies here or not, because I'm not creating the file but moving it.

View 5 Replies View Related

Ubuntu :: Bash: List Contents Of Folders

Dec 1, 2009

how I sould do the following?

I have a folder called "Downloads" and among its contents there are a bunch of files with "flv" extension.

If I do

Code:
ls path/to/Downloads/*flv
I will get something like this:

[Code]....

(The reason I want something like that has to do with a small script I'm trying to write).

View 5 Replies View Related

Ubuntu :: Zipping Contents Of Multiple Folders?

Oct 8, 2010

I have a set of folders in some directory /home/dir, and I'd like to generate zip files for the contents of each folder separately. I'm wondering if there's a quick way to do this with a one-liner, or what the bash script would be.

Directory structure: /home/dir/first/second/thirdand I want three files, first.zip, second.zip, and third.zip. I know zip isn't the best format, but these are for distribution to users on Windows machines and I'd prefer to keep them in the zip format.

View 2 Replies View Related

General :: Show Only The Parent Folder In The Shell Prompt?

Aug 8, 2011

Whenever I go inside a directory in Linux, it shows the file path at prompt like:

root@vivek-HP-Pavilion-dv6-Notebook-PC:/var/www/abc/def/

How can I change it to show short names instead?

View 1 Replies View Related

General :: Cannot Inherit The Permission From Parent Folder To Child

Apr 26, 2011

I have setgid permission on my home directory (/home/XXXX) the permission look like below.

Code:

drwxrws--- 2 toshi jadu 4096 Apr 26 16:54 getset

If I create new directory in this getset folder the permission of getset folder could not inherit.

Code:

#cd getset
#mkdir test2
#ls |grep test2
drwxr-s--- 2 toshi jadu 4096 Apr 26 16:56 test2

As I know the setgid utility allow to inherit the permission from parent directory to child directory.

View 4 Replies View Related

General :: How To Delete All Folders And Their Contents Except 3

Jan 28, 2010

I have a USB drive that has a TON of folders on its root level. I want to remove all those folders and their contents except three of them. I know if I do rm -rf that will kill everything, is there a way to exclude three folders, say folder1 folder2 newfolder, and do it all in one statement?

View 3 Replies View Related

Ubuntu :: Merge Directories - Transfer Contents Of All Folders Into One

May 4, 2010

I recently had to rescue files from a dying hard drive using Photorec. However, it dumped the files randomly in many different directories. Is there a way I can transfer the contents of these directories into one master directory without the file structure. For example, I have folders 1 through 10 as subdirectories in folder X. How can I transfer the contents of all those folders into folder Y while getting rid of the subdirectories 1 - 10?

View 3 Replies View Related

Ubuntu :: Cannot See Any Backup Hard Drive Contents Except Folders ?

Jun 5, 2010

Recently, Ubuntu was doing a standard update. It got stuck in some kind of strange loop. So i put the boot disk in cleared the master drive and reinstalled ububtu 10.4. I have a backup 500gb drive that use to keep the contents of my important information for my fileserver. After the completed install and found the backup drive STILL named "FILESERVER" and still has my folders aka: our pictures, our music, and our video. I opened them up and they're all empty. Am I missing some informaton? I swear i didn't format the drive. I couldn't have since the folders are still there. Where are all my files at?

View 4 Replies View Related

General :: Zipping Folders And Their Contents Into A .zip File?

Nov 23, 2010

How do I make a .zip file that contains every file AND every folder in the directory?

View 4 Replies View Related

Ubuntu :: /usr/local/bin/compiz-indicator:99: GtkWarning: Can't Set A Parent On Widget Which Has A Parent

May 3, 2011

I keep getting a segfault in compiz. I've tried everything! This is from a fresh install without and accelerated drivers (I have ATI)

Quote:

Code:

**Switching to Compiz window management**
/usr/local/bin/compiz-indicator:99: GtkWarning: Can't set a parent on widget which has a parent
menu.append(kill)
/usr/local/bin/compiz-indicator:100: GtkWarning: Can't set a parent on widget which has a parent
menu.append(start)

[code]....

View 2 Replies View Related

Debian :: File Permissions To See Other Folders And Check The Contents

Jul 17, 2010

I've created a new group and a new user called dftp... Now I wanna do one thing... If 'dftp' connects thru ftp he should be directed to a particular location... and he shouldn't be able to see other folder except for his own including the parent folder that contains that location... I changed dftp's home folder to the location I want. However while connecting thru ftp. user dftp has been given permissions to see other folders and check out the contents of the other folders.

View 5 Replies View Related

Programming :: Bash - Recursive Find - Create Parent Folder - Moving File

Dec 5, 2010

I'm starting bash shell script and I'm looping without any solution.

I'm trying to find some files under a folder hierarchy and in case of errors moving these files to a destination folder under the same hierarchy recreating this hierarchy if not exists.

Finding all ._* files under /src and moving them to /dest recreating folder1 or the others which contains ._* files but without moving files which does not correspond to the pattern.

Code:

I tried find command and I'am getting all needed files

Code:

But I don't know how to use the output to get the parent folder of files which are found to

1- create folder with mkdir -p /dest/folder1 or /dest/folder1/folder4

2- move found files from /src/... to /dest/... with rm command

I'm working on a find command as this trying to do all in the same line but ... little lost

Code:

View 8 Replies View Related

General :: List Folder Size And Number Of Files And Folders In Folder?

Nov 23, 2010

In Linux bash shell, for a given directory, how can I list:The create date for that directory The number of files in that directory The number of subdirectories in that directory.

View 3 Replies View Related

General :: Finding A Recursive Shell Or Perl Script To Delete Files With The Same Name As The Parent Folder?

Jun 29, 2010

is there a recursive shell or Perl script to delete files with the same name as the parent folder? i wish to include the starting folder name as argument to the script.

View 2 Replies View Related

General :: SVN Multiple Commands Single Revision - Add New Folders (with Contents) To The Repository?

Jun 18, 2010

I want to do something like svn add dir1 dir2; svn ci dir1 dir2 but have it be only 1 revision. Is there a way to do this? Is this the correct way to add new folders (with contents) to the repository? We are restructuring the trunk, so I cleared it out and plan on putting these directories with their contents in it.

View 1 Replies View Related

Ubuntu :: Cannot See The Contents Of The Trash Folder ?

Jul 5, 2010

When try recover a file from thash folder, i cant see the contents, but, when make properties to the folder, show 47 files on the trash folder, and the docklets of docky, also show files (41 files). Ubuntu Lucid 10.04

View 4 Replies View Related







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