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
ADVERTISEMENT
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
View Related
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
Sep 29, 2010
I know these folders each have >80gb of files. Yet, they only show 4.0K in ls -lah? How can I have ls show size including the contents?
[root@aapsan01 aapxen01]# ls -lah
total 48K
drwxrwxrwx 6 root root 4.0K Sep 29 03:45 .
drwxrwxrwx 15 root root 4.0K Sep 27 09:15 ..
[Code]....
View 4 Replies
View Related
Mar 7, 2010
Gparted shows that my dual boot laptop has the following partitions: [URL] I want to create a partition and move the contents of my Home folder into it.
View 3 Replies
View Related
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
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
Nov 24, 2010
How can I open a folder in a window from the command line. I don't want to list the contents of the folder by the "ls" command, but want to open the folder through the command line, like it opens when we double click on the folder.
View 12 Replies
View Related
Jul 13, 2011
I have many folders with many subfolders. All I want it to get the folder name and the first subfolder. I tried using ls -R but this give me more than I want it. Let say I have:
dir1/subdir1/sub_1_1/file.a
dir1/subdir1/sub_1_1/file.a2
dir1/subdir1/sub_1_1/file.a3
[code]....
All I want when I execute the command is to show me:
dir1/subdir1
dir1/subdir1
dir1/subdir2
[code]....
View 4 Replies
View Related
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
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
Sep 14, 2010
When I position icons on the desktop in specific places, then I choose to move a file or folder into another folder, all the icons arrange back to the left side. This happened in an earlier version of KDE 4.x, disappeared the next version, and reappeared. how to keep this from happening. It makes using the desktop a pain in the you know what.
View 2 Replies
View Related
Feb 13, 2011
this is posable but am trying to do this "Create folder from a filename and move the file into the folder" i have 500000+ file's i need to do with is there a easy way?I really don't want to download them all make/move them with filemonkey just to re-upload them
View 2 Replies
View Related
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
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
Apr 29, 2011
I found a script that runs any commands from a dropbox folder. It seems to take the scripts i have from the remote folder to the output folder to the old folder. but it never seems to actually run the scripts. it just seems to move the scripts from folder to folder Here is the page of what I'm talking about. [URL]
View 6 Replies
View Related
Jun 8, 2010
Resolved before asked: cat /proc/1111/status | grep PPid
View 2 Replies
View Related
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
Dec 1, 2010
I would like to move a folder to another folder but I just want to merge the two folders.
For example,
say I have Folder B which has the following files in it
- fileA
- fileB
- fileC
Folder A has the following files in it
- fileA
- fileB
- fileC
- fileD
- fileE
And I want to move folder A to folder B.
The objective here is to ensure that existing fileA, fileB and fileC are not replaced but fileD and fileE are to be copied across.
Is there an easier way to do this in linux?
I am running Ubuntu 10.04.
View 4 Replies
View Related
Sep 23, 2009
I have a folder name is /home/kemal. I want to give a permission to an user name is kaplan. I want to see this user name is kaplan that must see kemal folder's contents.
View 1 Replies
View Related
May 2, 2011
How to Copy the entire folder contents (including sub-folders and their contents) to another folder using PUTTY? Is there any command for that?
View 3 Replies
View Related
Oct 13, 2010
Recently I did a System Mechanics clean-up of invalid and other misc files. The files were moved to the recycle bin, but I couldn't open a file individually while it was in the recyle bin in order to double check whether or not I wanted to perminently delete it. I then selected all items and moved them to a single folder hoping to open it later to review the individual files.I don't know the folder name or what part of the computer this folder was moved to. Is there a way I can find this new folder, name unknown, that was created on 10-12-10? I'm sure it's taking up valuable space in my computer and I want to permently delete the unwanted items individually and not as a whole batch.
View 1 Replies
View Related
Jul 26, 2010
Where is my parent folder?
View 1 Replies
View Related
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
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
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
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
Mar 12, 2010
Anyways, I recently got into the whole HTPC scene, and picked up an Acer Revo for my self, with a media center OS (XBMC) that was apparently modded from Ubuntu. Keep in mind that I can only use the terminal for any of this, as the GUI is just for video settings, etc.
So, XBMC just totally crashed on me, and the GUI stopped working. The files were still there, I just couldn't watch them. After many hours of tinkering, I decided to just reinstall XBMC, but make two partitions, and then move my movies and stuff to the new, working partition, and afterwards, delete the old, non working one.
I just don't know how to move from one partition to another.
So, can someone explain, in absolute layman terms, how to move my "Movies" folder from my first partition, to the New one?
View 4 Replies
View Related
Jun 24, 2011
In my bash script I need to move files in a folder if it is not in use.
Code:
for entry in `ls /root/shared_storage/input`; do
echo $entry
run=`lsof /root/shared_storage/input/$entry`
ru=${run:0:5}
echo $entry
if [ "$ru" == "" ]; then
........
It worked fine sometimes but sometimes it just get stuck at lsof. Is there any other way that I can use here to check if the $entry is using some other process?
View 10 Replies
View Related
Oct 6, 2010
i need to write a short script that will compress a specific folder that`s on the Desktop (and all it`s content) and also will encrypt it with a password that is inside the script --->meaning it wont ask for a password+verification when compressing+encrypting
View 1 Replies
View Related