General :: Creating A Hard Link Using Ln Creates A Copy Of File?
Mar 11, 2010
I am trying to use ln to create a hard link to file a and whenever I do it, it creates a copy of the file instead. After having edited file a, when opening the link, it shows the old information and opening file a shows the new information. The command I am using is
Code:
ln /home/user/file
within the new directory i am trying to link from. I am using centos 5.4.
View 7 Replies
ADVERTISEMENT
May 25, 2011
There are basically two main limitations with hard links:
Hard links normally require that the link and the file reside in the same file system. Only the superuser can create a hard link to a directory.
Thus, symbolic links were introduced to get around the limitations of hard links. So, the question is, are hard links still needed? Might there be situation where they are more useful?
View 5 Replies
View Related
Jul 3, 2009
I have heard that creating hard link to a directory is not possible however when reading the man page of "ln" the "-d/-f" option says hard link directories ( super-user only). Thus this mean the super user i.e root can create hard link to directory and not a normal user , If yes then you . Even on specifying the above options I get a operation not permitted for a super user.
View 9 Replies
View Related
Aug 24, 2009
CentOS 5.2 64bit 2.6.18-92.el5xen. Use rsync with --link-dest for nightly backups, works well. Was recently asked to start weekly backups to an external drive for off-site storage. The regular syncing works but hard linking seems to be ignored. So the backup is long with no space saving advantage. Here is an example of the command being run:
rsync --stats -axzvl --numeric-ids --delete --link-dest=/mnt/DISASTERBACKUPS/austinBackups/backups/2009-08-21 /AUSTINBACKUPS/backups/2009-08-24 /mnt/DISASTERBACKUPS/austinBackups/backups/
View 4 Replies
View Related
Jul 18, 2011
I'm a Red Hat 6 newbie but have been around Unix.I looked at some threads here regarding this issue and haven't been able to find a solution.I'm executing;
lpadmin -p bam -v socket:139.64.101.21 -m /etc/cups/ppd/BR5370_2_GPL.ppd
When I look in /var/log/cups/error_log, here's what I get:
E [18/Jul/2011:14:37:36 -0700] [cups-driverd] Bad PPD name "/etc/cups/ppd/BR5370_2_GPL.ppd"!
E [18/Jul/2011:14:37:36 -0700] copy_model: empty PPD file!
[code]...
View 5 Replies
View Related
Oct 24, 2010
I have a Java program (minecraft server) that needs to be run from the command line. The code is:
Code:
java -Xmx512M -Xms512M -jar minecraft_server.jar nogui
To make life easy (i've got the java file in a folder on the desktop) I want to have a shortcut (or similar) sitting on the desktop. I've tried
Code:
ln 'java -Xmx512M -Xms512M -jar minecraft_server.jar nogui' ./../minesraftserver
with single and double quotes but my unix command line skills are pretty basic and this is obviously incorrect.
View 2 Replies
View Related
Feb 2, 2011
I am trying to create an empty file based on the remaining hard disk space. The problem is that when I create a file that is 1 GB large, the df command shows the remaining space to be only 12 kb smaller than it was before the file was created.
someone@here:/tmp/delete# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 36827144 5031592 29924788 15% /
[code]....
View 2 Replies
View Related
Jun 20, 2011
I have searched around and am trying to understand the difference between a hard link and symbolic link (soft link). I found this link is quite useful. But I am still not very clear. I understand soft link is not a copy of original file, but is a hard link a copy or not?
View 4 Replies
View Related
Jan 25, 2010
I plan to reformat & reinstall my linux (centos).Before doing this, I got to backup my files into my USB external hard disk from Seagate (FreeAgent). The problem I faced is that I could not copy file into the hard disk even I was in root user. It prompted me that it is only read-only. I just wonder why.I have tested with my thumb drive. It worked. May I know why I could not copy file to the USB FreeAgent hard disk. Due to file system?
View 3 Replies
View Related
May 29, 2011
Has anyone seen a seamless way to create a symbolic link via a GUI based file manager? I have been using PCManfm because I find it fast, but I can copy the file but paste a symbolic link instead of the actual file.
View 9 Replies
View Related
Nov 4, 2010
I don't think this is a "perl one-liner" of find and replace. I'm trying to auto-fill some information in a listing of files. The simplest example is that in the files the following exists:
I would want the script to find this and populate it with something like -- Date : 20101004-1758
I have a few more similar fields to autofill, and I'd like to do this from within a larger perl script I'm developing to process these files. So, how I perform in-place file modification from within a perl script?
View 3 Replies
View Related
Oct 1, 2010
Ubuntu 10.04 64-bit
Partition on HD
/root
/home
[code]....
View 1 Replies
View Related
Apr 13, 2011
I need to copy tables from abc5/abc5@pqrXYZ1 to jk8/jk8@pqrXYZ1. For this I am trying to create a link between the 2 databases but not wkng.I am pasting here what I ve tried.
sqlplus jk8/jk8@pqrXYZ1
[code]....
View 4 Replies
View Related
Apr 14, 2010
My cron job is executing the below mysqldump command but it produces an empty sql file. However, when I run from the command line, it works as expected.
Code:
15 6 * * * root mysqldump -uroot -pXXXXXXX mydbname | gzip > /home/dbbackup/db_`/bin/date +\%Y\%m\%d\%H\%M`.sql.gz
I'm on CentOS 5.4 and use "env EDITOR=nano crontab -e" edit my cron (then paste the above command.
View 5 Replies
View Related
Sep 17, 2009
I have an external hard drive mounted at /media/exthdd/ On that hard drive I have folders: Music, Pictures, Videos, etc. Can I make symbolic links to /media/exthdd/Music/ to say the root directory /_ ? the directory /_ is empty I just want a quick method of typing to get me there much like [cd ~] gets me to my home/username folder. I have my music organized by Artist/Year-Album/Track.Title.mp3 I want to be able to "cd /_" then "ls" and see all Artist folders.
View 9 Replies
View Related
Sep 6, 2010
In the ordering of files I keep I need links to directories. Sometimes I even need to move directories to new locations. I have tried using symlinks, but they become dead when I move the directory they point to. I have tried hard links, but I haven't found any Linux file system that would support hard linked directories. How can I achieve that a complex structure of directories (currently with symlinks for directories and hard links for files) keep symlinks live when directories are moved?
- is there any utility that updates symlinks when a directory is moved?
- is there any Linux filesystem that supports hard linked directories?
- is there any good Linux interface to the new NTFS (the only file system I know to support automatically updating directory links, called directory junctions)?
View 9 Replies
View Related
Sep 8, 2010
how can we create soft link and hard link in RHEL5 when am using in command it is giving format error
View 6 Replies
View Related
Nov 16, 2010
We have two directories:
$ ls -l
total 8
drwxr-x--- 2 nimmy nimmy 4096 Nov 15 19:42 jeter
drwxr-x--- 2 nimmy nimmy 4096 Nov 15 19:42 mariano
I create one file in the first folder:
$ dd if=/dev/zero of=jeter/zero_file.1 bs=512000 count=1
1+0 records in
1+0 records out
512000 bytes (512 kB) copied, 0.268523 s, 1.9 MB/s
This is the output of du:
$ du -sh *
504K jeter
4.0K mariano
As expected, if I place a hard link of the zero_file. in the other folder du output does not change:
$ ln jeter/zero_file.1 mariano/zero_file.2
$ du -sh *
504K jeter
4.0K mariano
there is nothing in the filesystem that points to zero_file.1 as the original file. So how does du know to count zero_file.1 but not zero_file.2?It cannot be a timestamp comparison because all hard links share one inode; they'll have the same timestamp data correct?
View 3 Replies
View Related
Mar 1, 2011
How to copy a Read-Only file in Linux and make the copy writable with a single cp command in Linux (Ubuntu 10.04)? The --no-preserve and --preserve seemed to be good candidates, except that they should "and" the mode flags, while what I am looking for is something that will "or" them (add +w mode).
More details: I have to import a repository from GIT to Perforce. I want that all Perforce depot files are Read-Only (that is how Perforce was designed), while all other files that were derived/copied from depot files are writable. Currently if a Makefile tries to copy a Read-Only file then the derived file will also be Read-only. This leads to build-errors when cp tries to overwrite Read-Only file second time. Of course the --force is a workaround here but then the derived file is also Read-Only. Also I do not want to mess with "chmod" after each "cp" command - I will do that only as the last resort.
View 1 Replies
View Related
Jul 28, 2010
I am new to the Linux world and I am not sure if what I am trying to do is achievable or not. I am trying to make an image of my existing drives running Linux on a USB and I want to use the same image off the USB to clone more bootable hard drives. Something like what Ghost does in windows. The problem is using 'dd' the image is too big ( I have 1tb drives ) and then I am not sure how to convert these images back on to new drives so that they boot in the OS as well. i am not sure if there is a utility that would let you do that?
View 2 Replies
View Related
Jan 22, 2010
We are in the process of pruning our directories to recuperate some disk space.
The 'algorithm' for the pruning/backup process consists of a list of directories and, for each one of them, a set of rules, e.g. 'compress *.bin', 'move *.blah', 'delete *.crap', 'leave *.important'; these rules change from directory to directory but are well known. The compressed and moved files are stored in a temporary file system, burned onto a blue ray, tested within the blue ray, and, finally, deleted from their original locations.
I am doing this in Python (basically a walk statement with a dictionary with the rules for each extension in each folder).
Do you recommend a better methodology for pruning file systems? How do you do it?
View 2 Replies
View Related
Dec 7, 2010
I have installed gcc-3.3 & g++-3.3 in ubuntu 9.04. Now I want to change the default compiler as gcc-3.3/g++-3.3. After creating links to newly installed gcc/g++, gcc works fine but g++ doesn't work.
When I give "$which gcc" or "$gcc --version" it works fine, but when I give "$which g++" it gives nothing and also "$g++ --version" it gives an error "the program 'g++' can be found in the following packages: * g++..." When I installed gcc I gave the command "$configure --perfix=/opt/gcc33 --program-suffix=33 --enable-languages=c,c++" . When I give "$which g++33" and "$g++33 --version", work fine.
I tried following:
$export CXX=g++33
$sudo ln -s g++-3.3 g++
Nothing happens. I am very new in Linux and I need to install ns2.1a9b in gcc-3.3.
View 2 Replies
View Related
May 13, 2009
I downloaded the latest version of JBidWatcher and I run it with the following command...
Code:
java -Xmx512m -jar JBidwatcher-2.0.1.jar How do I create a link on the desktop or on a panel to execute that command? I can only imagine this is pretty easy but I am not getting it.
View 5 Replies
View Related
Dec 20, 2010
I am trying to install Java on firefox, and when I try to create a symbolic link, I get this output: ln: creating symbolic link `./jre-6u23-linux-1586.bin': Permission denied I tried using sudo, but it still did not work.
View 1 Replies
View Related
Nov 20, 2008
I'm connected remotely with Putty to a linux server and I need to get the files from a directory on the server onto my hard drive on my laptop. I don't know what the secure shell command is to download it or what exactly I need to do so I can get these .root files from the server copied onto my local hard drive.
View 2 Replies
View Related
Jan 25, 2010
I got an USB hard disk, which is formatted in VFAT32 in window. I try to back up my file.tar to this hard disk. i got this error: writing `/media/PD03/xxx.tar': Input/output errorand the mount point is disappeared by itself.mount point: /dev/uba1the file I tar as a root... i copy the file as a root user as well.mount point info:/dev/uba1 on /media/disk type vfat (rw,noexec,nosuid,nodev,shortname=winnt,uid=500)
View 3 Replies
View Related
Sep 14, 2009
error message when I ran my program that I couldn't open my local file. I have two files first one is called client, second one is called server I am using named pipes to sent a message from client to the other file called server in client I used mknod() to create the two named pipes,one for read,one for write and created new thread in client using fork() spawned a child process that executed the server file both named pipes are opened the client file got the message from the user and sent it through the named pipes to the server file when the server receives the message , it needs to verfify it is correct in the server file, a local file descriptor is created to read and send this verifing message when it is not correct but I am getting an OPEN() error when I tried to open this shared local array buff and attach it to a file descriptor where the message is kept why do I get this error in server file
int main()
{
/*both named pipes are open*/
rfd=open(IFIO1,0);
wfd=open(IFIO2,1);
[code]....
View 1 Replies
View Related
Apr 2, 2011
I have a bit of a problem that I don't understand and would like some help please - I will try and explain the best way I can. I installed Ubuntu using the WUBI installer and so I can access my Windows partition in /host. Using Wine I can run World of Warcraft by going to /host/Program Files/World of Warcraft/WoW.exe But I would like to create a link on my desktop to that file so I do not have to keep going to that path everytime.
The Problem - when I click make link and drag it to my desktop I double click the file (expecting it to just act like a windows shorcut) but it doesn't - it creates some of the files that are in the world of warcraft folder on the desktop and then fails to open with message: Failed to open archive dataart etc...its like it is creating a copy of files on my desktop of what is already in the WoW folder.
View 2 Replies
View Related
Aug 25, 2009
How can you create a script to move or copy files from a main directory into multiple directories below the main directory.
View 7 Replies
View Related
Sep 10, 2011
I have a broken DVD drive and no others available right now to burn a DVD iso to so I'd like to use a empty hard disk instead.
I've tried Unetbootin but that only copies a few megabytes of files - the rest of the image data in the ISO is ignored.
I have verified the ISO is valid and working with VirtualBox. It's MD5 hash is also as expected. But I need to boot at the real bios not an emulated one.
I've also tried things like:
sudo cat /disk/image.iso > /dev/sdb1
and that got "Permission denied" -
View 3 Replies
View Related