Hardware :: Use The Mv Command To Move Certain Subtree Within The Tree?
Nov 27, 2010
Kernel 2.6.21.5, Slackware 12.0
Suppose I use the mv command to move certain subtree within the tree rooted at /. May I expect only a very small quantity of sectors will be involved in the process? Or, on the contrary, it is probable that a large amount of data will be transfered from sector to sector? Assume ext2.
If any of you is wondering why such a theoretical question, I am ready to translate it to practical terms: I have just created a directory called /home/john/mic2 which I expect to grow until reaching over a thousand nodes (nodes in the sense given to this word when studying lattices, trees and the like). But maybe later I will change its name to /home/john/mic1 for which, I think, mv is the usual tool in Linux.
mic2 is just a file. As such, there is a set of sectors associated with it. When I rename, these sectors will be left vacant and a new set of sectors will be written. Or maybe the same set shall be rewritten. And is that all? Remember mic2 is by now about a thousand nodes "large".
View 3 Replies
ADVERTISEMENT
Dec 19, 2010
In solaris we have ndd , tip and ptree command but I couldnt find any similar command in Linux. does anyone knows the equivalent for ndd ptree tip then please let me know.
View 2 Replies
View Related
Apr 24, 2010
I'm trying to find a command or program to show what files and folders are taking up the most space on the hard drive, much like tree size view on windows, is there and equivalent on linux?
View 2 Replies
View Related
Aug 4, 2010
For a given directory, I want to know the space occupied on disk by it and all files and directories having it as an ancestor, so to speak. Is there a command for this in linux?
View 2 Replies
View Related
Sep 19, 2010
I'm connected to a Linux box through SSH on which I don't have administrative privileges. The command I wish to use is called tree, but it isn't installed. Is there any way I can load the tree program into my home directory and run it without the need to install it system wide?
View 2 Replies
View Related
Jul 30, 2011
I want2 know that how stop move folder on samba share.
View 1 Replies
View Related
Nov 2, 2010
I have run a command which finds a lot of files based on some search criteria. It returns the files like so:
./somepath/somepath/file.something
./asdf/asdf/s.php
./etc/a.php
./a/b/c/d/e/f/g.jpg
So I was wondering, if I capture this output into a file (ie. one file per line), can anyone help me write a command which iterates through the file and moves the files one by one to a specified directory?
View 3 Replies
View Related
Mar 12, 2010
I'm doing a little work on my media center and the scrappers seem to do a much better job when each movie is in a directory with the name of the movie. However that's not how i have things set up.I have a few hundred avi files i need moved to directory named the same as the avi file.
View 3 Replies
View Related
Jul 31, 2010
Is there a way to reposition the Gnome panels from the command line?
View 9 Replies
View Related
Sep 15, 2010
I liked the idea of the "cosmos" screensaver/desktop, but wanted to add my own pictures to the application. I navigated to /usr/share/backgrounds/cosmos and tried to drag and drop. I quickly found that I did not have permission to do this.
I googled my problem and found some command line tutorials telling me to sudo cp. My problem is that I have about 30 pics that I want to move in there, and I don't think I can just move the directory, they have to be in that folder as the pictures themselves.
I don't really feel like typing the cp line multiple times with multiple randomly named image files.
Is there a way to have the command line cp all of my files from one directory to another?
View 4 Replies
View Related
Aug 10, 2010
I need to redirect a domain to a subtree of another subdomain , for example : [URL] should be redirected to [URL] How should I do this ?
View 1 Replies
View Related
Jul 16, 2011
How do I move around select a file and move or copy it. All tutorials I have seen are not simple enough.
View 7 Replies
View Related
Sep 21, 2010
I want to know the command, so that i can move back two days i.e. all the changes i made during the two day is rolled back .
View 5 Replies
View Related
Nov 22, 2010
I have 10 files of .dat formatsayA MCDR .datB MCDR .datand so one upto 10 dat filehow i convert these 10 dat files to txt files using single command or script
View 6 Replies
View Related
Mar 18, 2009
I'm trying to find a proper command to move a certain set of files according to date/time range. I am thinking that the command should be something like:
Code:
ls -l | grep 'date/time range' | mv /folder
View 6 Replies
View Related
Sep 19, 2010
For Ubuntu 10.04 LTS / Gnome 2.30.2.
I have two applets on my Gnome panel -- NetworkManager Applet 0.8, and Klipper (it works better than Glipper) -- that I want to move.
HOWEVER, right-clicking the panel icons does not enable me to move these applets, as follows:
- NetworkManager Applet 0.8 does not include a Move item in its list of options.
- Klipper displays a long list of Klipper options but no Move option.
How I can move these items to new locations on the Gnome panel?
View 6 Replies
View Related
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
Mar 22, 2011
I'm wondering if there exists a program get can build a tree from the ftp?
View 3 Replies
View Related
Nov 30, 2015
I have a home storage of many drives which are seldom accessed, and extremely seldom written to. So, I made several RAID1 arrays with "write-mostly" drives in each one, so that all the drives spin down after a while, and if they are accessed, only one drive in each array has to spin up. This way, I hope to minimize the risk of losing anything due to mechanical shock or wear.
But it was not so easy. First, the write-mostly drives did spin up on every read request due to a bug in the kernel, so I managed to get the fix accepted into the newer kernels (which is my largest contribution to the Linux development so far. See [URL] .....) Now, if I read directly from the array, it works as expected (only the first drive spins up); but if I create a filesystem there (ext4) and read from it, the second drive still spins up anyway. (Does ext4 write something when it reads a file?.. I have it mounted with relatime, so AFAIK it shouldn't...)
Well, I thought, I'll just mount the filesystems read-only and remount them if I need to modify the data there, which is not very often, to say the least. Also, this way the drives don't have to spin up every system shutdown to unmount the filesystems; during a power outage, it used to take a lot of time for them to spin up one by one just to unmount, while my UPS had to survive long enough for them to finish. That's one more problem solved.
But I decided to improve even further. Sometimes I just want to see the contents of those arrays without even accessing some files (for example, when I accidentally click the wrong network drive button in Windows, or when I just want to see if I have something there or not). If I read the directory trees during startup and keep them cached, then those drives won't even have to spin up at those moments! The question is, is there a way to do it? I remember Linus boasting about our kernel being the best at caching the filesystem trees, and I know there is vmtouch [URL] .... which allows us to keep some files cached, but what about the directory tree itself?.. If I simply "find" all the files there, it seems to work, but they get evicted from cache sooner or later...
View 3 Replies
View Related
Jan 27, 2010
I'm looking for some software that could help me make a family/work tree. The only problem is that I would like to add other types of connections other than the blood related ones, such as worked with, studied with, supervised someone else etc. And perhaps have the possibility of adding some data about each person and export in a format that can be used by other programs as well.
View 1 Replies
View Related
Jan 9, 2010
I think I've finally settled on Slackware, but I kept missing Arch or FreeBSD for some reason. Last night I realized it's the abs/ports systems they have. I love the freedom to rebuild any package from source so I can configure build options and not worry about how packages from third party sites were compiled (missing features, patent restrictions, etc.).
SlackBuilds.org is awesome, and according to that site Pat uses SlackBuilds to build the official packages. Wouldn't it be great if there was a /var/slackbuilds/ directory with subdirectories for each software set for the officially supported software and then a subdirectory for each category on SlackBuilds.org?I would really like to see this in Slackware some time. It would help organize all the available software in the official sets and SlackBuilds.org and make it easy to compile anything. Other software would, as usual, be downloaded from third-party sources and simply installed that way.
View 14 Replies
View Related
Jan 3, 2011
I have a straingh problem with kill. I start a skript run.sh. With Ubuntu i can kill run.sh and the whole pstree is killed. with centos it does not work?
[Code]....
why does centos do not kill the wohle tree? is there someting with the bash? ubuntu use 4x and centos 3.2
View 2 Replies
View Related
Jun 10, 2010
I've got a directory structure full of files. I want to convert them all into some other format, but I don't know how to keep the directory structure, is there a way so I can "set" which command to use on files instead of `cp`?
View 4 Replies
View Related
Dec 29, 2010
I initially set up my filesystem on a single disk, normal, plain vanilla, with a partition for /var.Just as an example let's say I have in this file system a path /var/lib/temp.Under /temp I want 4 directories /one, /two, /three, and /four so I get /var/lib/temp/one and /var/lib/temp/two, etc. So I created them.Now I want to separate the directories /one, /two, /three and /four such that each is on its own partition. I create the four partitions and then copy into the appropriate partition /one, /two, /three, and /four. Of course all the stuff inside of those directories are moved over as well.
In fstab I locate a mount point called /var/lib/temp, located just below the /var mount point, and it is on the line with the partition that holds /one.Save fstab, mount -a and it works. Back to fstab, add a second line below the first with same mount point but this time with the partition for /two.Mount -a and /one fails and /two is up. So yes, I can't just put the fstab file together the way I did. I see that clear as day. Last line wins. What I don't see is how to make it right.
View 6 Replies
View Related
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
Jan 12, 2011
I am looking for a tree style note app that can encrypt its files. Something like Zim in layout and function.
View 4 Replies
View Related
Sep 27, 2010
I am trying to use the cp command to copy some files around but want to preserve the entire folder structure. Example:
Then within the /backup location I want to see /backup/folder1/folder2/file.
I have tried cp -a and cp -p but neither give me the above.
View 3 Replies
View Related
Apr 28, 2010
The command: Code: ls -lRt Shows a recusrive listing, and sorts by modification time. But this in in tree fashion, where it first lists the contents of the current folder sorted by time, and then the contents of each child folder sorted by time. How would one accomplish this type of sort, but with an aggregate listing - all items recursively sorted together, rather than by individual folder?
View 3 Replies
View Related
Sep 26, 2010
I am working on a project where I need to use the C language to generate a tree of processes. I understand how fork() works but I cant seem to get fork() to create two children from one parent and then have the two children create two more children.
Right now what i am seeing is a chain...where the parent creates one child...and that child creates another ONE child..etc.
Here is what I have so far:
for (i=0; i<n;i++){
if (childpid = fork()) break;
}
if (childpid == -1){
perror ("
[Code]....
View 3 Replies
View Related
May 7, 2011
looking to write a dependency map tree that creates a tree structure of object names . This tree will be written to a file and read back to create the tree structure of files . how to write this using bash ?
View 1 Replies
View Related