thanks a lot for your help, it worked nicely..
may I ask you to explain few things ?
why the dir1 structure is different from dir2 ?
and what does this line do?
I used files from dir1 as reference since you said same number of files with exactly same names, $i is file from dir1 and $file is file from dir2 to understand clearly, better you insert below line after file="$dir2/$filename"
and filename=${i##*/} is parameter substitution is used instead of external basename program. Let me know if you still have confusion.
This User Gave Thanks to Akshay Hegde For This Post:
how can i make a script or command to have output like this
$cat file
10000 20000
$cat a
10000
$cat b
20000
this is the solution paste a b > file
but another solution?
$cat file
10000 20000 (3 Replies)
We have a guy at work who is trying to copy and paste from one file to another using vi and highlighting the code to copy with a mouse.
Source file:
xyz 123 abc 999
zyx 321 cba 999
xyz 123 abc 999
But when he pastes it he gets (I put the underlines in to show... (4 Replies)
This is the code and I'm wondering why line 14: a = ... and line 16: b = ... is wrong.
This is the first time I've tried to use this. Please help me.
#include <stdio.h>
#include <math.h>
// The link and how the double pow is used.
//
// http://www.nextdawn.nl/c-reference/pow.php
//... (2 Replies)
Dear All,
Recently got some sample from internet search for array handle in shell script, and I can not understand why we need to put double brackets when extracting array values by this way :
for ((i=0; i<${#admins}; i++)); do
echo "${admins}"
done
if modify from double to single... (2 Replies)
hi,
I have a file with content like this for an employee:
EmployeeID
101
Day_type, day
vacation,1/2/2009
sick day, 3/2/2009
personal day, 4/5/2009
jury duty day, 5/5/2009
how do I make the result to show:
EmployeeID,Day_type,day
101,vacation,1/2/2009
101,sick day,... (6 Replies)
paste -d "\0" ap_cntrl_total.txt.1 ap_cntrl_total.txt.2, and it shows:
01234567890911051342C091026 0000910517990000000000009105179900000000CHOPME
it put space btwn 1026 and 000091
should not have space.
---------- Post updated at 03:54 PM ---------- Previous update was at 03:03 PM... (1 Reply)
I want to change the name of some of my files (mypics-0001, mypics-0002, mypics-0003.....mypics-0240) and I want to double check to see if this code is right:
x=0
until
do
sed 's/mypics\-*/bday/g'
done
Would this change all of my file names to "bday0001....bday0240"?
Please let me... (0 Replies)
hi everybody,
can you help me with this?
important: it has to be a pure perl code.
zz.lis:
accessibility
arabic
archivers
astro
audio
benchmarks
.
.
.
"ls accessibility | grep -v Makefile" outputs
accerciser
at-poke
at-spi
at-spi-reference (6 Replies)
Hello folks,
I've a (perhaps) simple question.
In a text file I've :
server_name1: directory1
server_name2: directory2
server_name3: directory3
I want to make a loop that lets me connect and operate on every server:
rsh server_name1 "ls -l directory1"
I've tried with awk,... (6 Replies)
file1.txt
file2.txt
file3.txt
desired output is
each file is in the same directory, hasthe same number of columns but different rows. i want to be able to paste them into one file.
thanks! (5 Replies)
Discussion started by: johnkim0806
5 Replies
LEARN ABOUT DEBIAN
mhddfs
mhddfs(1) General Commands Manual mhddfs(1)NAME
mhddfs - The driver combines a several mount points into the single one.
SYNOPSIS
mhddfs /dir1,/dir2[,/path/to/dir3] /path/to/mount [-o options]
mhddfs /dir1 dir2,dir3 /mount/point [-o options]
...
fusermount -u /path/to/mount
fstab record example:
mhddfs#/path/to/dir1,/path/to/dir2 /mnt/point fuse defaults 0 0
mhddfs#/dir1,/dir2,/dir3 /mnt fuse logfile=/var/log/mhddfs.log 0 0
OPTIONS
with an -o option1,option2... you can specify some additional options:
logfile=/path/to/file.log
specify a file that will contain debug information.
loglevel=x
0 - debug messages
1 - info messages
2 - standard (default) messages
mlimit=size[m|k|g]
a free space size threshold If a drive has the free space less than the threshold specifed then another drive will be choosen while creat-
ing a new file. If all the drives have free space less than the threshold specified then a drive containing most free space will be
choosen.
Default value is 4G, minimum value is 100M.
This option accepts suffixes:
[mM] - megabytes
[gG] - gigabytes
[kK] - kilobytes
For an information about the additional options see output of:
mhddfs -h
DESCRIPTION
The file system allows to unite a several mount points (or directories) to the single one. So a one big filesystem is simulated and this
makes it possible to combine a several hard drives or network file systems. This system is like unionfs but it can choose a drive with the
most of free space, and move the data between drives transparently for the applications.
While writing files they are written to a 1st hdd until the hdd has the free space (see mlimit option), then they are written on a 2nd hdd,
then to 3rd etc.
df will show a total statistics of all filesystems like there is a big one hdd.
If an overflow arises while writing to the hdd1 then a file content already written will be transferred to a hdd containing enough of free
space for a file. The transferring is processed on-the-fly, fully transparent for the application that is writing. So this behaviour simu-
lates a big file system.
WARNINGS
The filesystems are combined must provide a possibility to get their parameters correctly (e.g. size of free space). Otherwise the writing
failure can occur (but data consistency will be ok anyway). For example it is a bad idea to combine a several sshfs systems together.
Please read FUSE documentation for a further conception.
COPYRIGHT
Distributed under GPLv3
Copyright (C) 2008 Dmitry E. Oboukhov <dimka@avanto.org>
February 2008 mhddfs(1)