General :: What Is The Purpose Of Using Hard Links Instead Of Being A Shortcut To Some File
Mar 23, 2011what is the purpose of using hard links instead of being a shortcut to some file ?
View 5 Replieswhat is the purpose of using hard links instead of being a shortcut to some file ?
View 5 RepliesI am trying to create hard links within a file system to a directory, but unable to do that. is there any limitation to create hard links to directories within file system ?
View 4 Replies View RelatedI can see some soft links in /etc directory which are pointing to /etc/rc.d Directory contents.
Code:
lrwxrwxrwx. 1 root root 7 Jan 31 08:19 rc -> rc.d/rc
lrwxrwxrwx. 1 root root 10 Jan 31 08:19 rc0.d -> rc.d/rc0.d
lrwxrwxrwx. 1 root root 10 Jan 31 08:19 rc1.d -> rc.d/rc1.d
code....
Any body please tell me what is the purpose of these soft links in /etc directory ? I am using RHEL 5.4 ...
I attempted to run various cron jobs as root - just general server make-tidy stuff. But if I edit the /etc/crontab file directly, these tasks don't get run. However, if I use crontab -e as root, these jobs appear to work. Any idea why this might be the case? Also, I understand that user cron jobs are stored in /var/spool/cron/<user> (including root). If this is the case, what's the purpose of the /etc/crontab file?
View 5 Replies View RelatedCentOS 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/
I am, as the forum title suggests, new to linux and to programming and having trouble figuring out how to do this.I have a very large XML file with a lot of information in it. I'm trying to get a single tag out of the file, each of these tags contains a single web link and I want to download the file at every single one of those links. I really don't know how to do this.My thought, though its probably not the most efficient or correct way, was to use VIM to search the document and somehow extract all of this one particular tag and then use wget on the links.
View 3 Replies View Relatedi have to write a shell script that takes name of the file as command line argument and the script should use path envt variable to look for the specified file and specify where are the different instance of the filename specified exist
firstly enter the filename echo "enter the filename" read filename by using ls command we can get to know how many links are there for that file but i don't know how to get the pathname of the file and its links after knowing the pathnames of the file i can set the path variable using export command can any one tell me how to get the pathname of the file i entered as a command line argument
we can save the users password in /etc/password file itself.then why a special file /etc/shadow is created to save the encripted password of users.
View 2 Replies View Related[Code]....
I am trying to remove <a href links using SED but unable to do it.
The finale result I am looking for is
[Code]....
Is it possible with Linux or should I try with Php?
On a production Centos 5.3 system, I want to raise the hard & soft limits of open file handles from 1024 -> 8192 (not a "biggie", I'd think) Right now, "sysctl -a | grep file" shows fs.file-max=463144 (a default, I'd guess) I'm guessing file-max is the maximum number of open file handles on the system, vs the per-user limits seen with "ulimit -Hn" and "ulimit -Sn". Right? If so, I shouldn't think I'd have to touch this on a server with few users.
Also, after doing a lot of reading, I still don't understand the mentions of needing to also add: "session required pam_limits.so" to /etc/pam.d/loginor adding "session required /lib/security/$ISA/pam_limits.so" to /etc/pam.d/system-auth Maybe I've gotten off into the deep weeds in goggling about raising file handle limits.
I become successful to download kernel, compile it and run it.BUTWhen i modify tcp.c file or any other file in this /usr/src/linux/net/ipv4 location, (just modifying c files) i have to compile the complete kernel every time, which is very time consuming procedure.So Please help, How to compile that net/ipv4 package or etc.
View 5 Replies View RelatedI have a Music folder and I need to create hard links for all files in Music directory.For example:
~/Music/01 - the song.ogg // hard link for this file
~/Music/Folder/02 - a song.ogg //and for this file TOO!
~/Other Music/01 - the song.ogg
~/Other Music/Other foldr/02 - a song.ogg
I want hard link files in folder and in subfolders, but not folders its self.
I have a 32-bit Linux server with an ext3 file system. Is there any kind of upper-limit to the number of hard links I am allowed to use? (Per inode...? Per directory...? Per filesystem...?) And (just out of curiosity) would this be any different if I had a 64-bit machine or a different file system?
View 1 Replies View RelatedI am using rsync for incremental backups. I am backing up to a second hard drive on my computer. When I check the individual backup directories (backup.0 through backup.4) with du -hs they each show 12G; when I check the parent directory squeeze it shows 15G. Over 4 backups I have added 3G. I haven't made very much for changes to directories I'm backing up and am using hard links. I have included some info below.
Quote:
Backup script:
#!/bin/bash
mount /mnt/backup
cd /mnt/backup/squeeze/
rm -rf backup.7
[code]....
I am copying my home folder from my old computer (Ubuntu 9.10) to my new one (Ubuntu 10.04)
I thought that I would make a tar archive of my home directory (~60GB), then copy it across the network and untar it in my new home folder.
The problem is that I have several hard links (30 at most). When I try and untar the tar in my new computer it runs into errors with the hard links.
I think the problem is that it has unzipped the hard link before it's target and detected an error.
One solution is to add --hard-dereference to the tar command , this will create a separate copy of each hard link. but I would really like an exact copy of my home folder on my new computer.
Does anyone have any ideas? Either copying my home directory, or how to make tar handle hard links sensibly?
wanted to knowIs there a command the root user can type in the command line to list & know all soft and hard links there are in a distro that is installed ?
View 1 Replies View RelatedI'm researching about symbolic links been used with samba / CIFS:I'd like that the user that uses a MS-Windows OS could see my shared folder on CentOS 5 and the symbolic links that are inside this folder. Well, it works but, the user will see that the size of the file is bigger than the real file. Apparently, CIFS gets the size of the symbolic link (aproxim.32K) and add it to the size of the file.Example 1: 100KB file, used with shared folder, MS-Windows's user will see 100KBExample 2: 100KB file, used with symbolic link inside a shared folder, MS-Windows's user will see 132KB. (Sym link + size of file)Is there a way to allow the user only see the size of the file, and not the file + symbolic links ?
View 1 Replies View Relatedcan anybody tell the use of make file in Nis server.
View 1 Replies View RelatedWhat is the purpose of bash scripting? Is it just for file manipulation?
View 4 Replies View RelatedI've always been confused about this issue of boot partitions. In the past when I install linux I usually have 2-3 partitions.
1. Main OS partition mounted on /
2. Storage partition mounted on /home
3. Swap partition
Why and when would I need to have a boot partition? Even if I dual boot two OSs, I just make one more partition for that other OS. So what's the purpose of a boot partition?
Can you explain me what is purpose of shebang in scripts? I have noticed that my scripts will run without shebang. i.e. When i save my crontab file it says that scripts will be executed in i.e. /bin/sh shell. So, what is the point if I put #!/bin/ksh at the start of script?
View 8 Replies View RelatedI have a folder that may contain text documents, pictures, MP3s, video clips, all sorts of stuff. Supposing that, within reason, I'm not too bothered how long it takes to compress and uncompress them. And suppose I don't care if it's free or open source (well, has to be free as in beer). What's the best compression format/algorithm (whatever it is that I install in Synaptic and choose from the drop down menu in the compression tool) I should use?
View 9 Replies View RelatedThe last time I wrote code for anything was about 15 years ago using Turbo Pascal. I would like to get back into it, most likely to create some mobile apps or enhance web sites. What is the best general purpose language to learn? And what is a good method for learning, preferably free?
View 1 Replies View RelatedI want to create a general switch that I can use to send a signal to my ubuntu server when it is activated/deactivated. Here's an example: I want to know when a certain door is open, so I can have a switch closed when the door is closed and opened when the door is opened. When opened or closed, the computer will receive a signal and I can have some software intercept this signal and process it to my liking (i.e. ring a bell/text message me/email me/etc).
I know I will have to create a simple driver, software to make use of this signal, etc... I am willing to do whatever it takes to make it happen. I'm just wondering if anyone can point me in the right direction as far as which interface I should use to communicate with my server (i.e. usb, serial), which references I should read, and any personal experience you have with something like this...
What is the purpose of libc in an operating system?
Is the libc is common for all OS or it is different for different OS!?
I mean source of libc build for RH is same for Ubuntu !?
I have been trying out in learning with logrotate command and logrotate configuration file )logrotate.conf custom logfile for an process is 'test.log'
Code:
#cat /etc/logrotate.d/test
/var/log/test.log {
rotate 4
[code]....
whenever the log file (test.log) exceeds 100M a new file will be created with the file name as test.'date'.'gz'(new file is created with a current date and in a compressed format of gz) and also with permission mentioned above). I really dont know what is the role of rotate( will this be carried on only for next 4times i mean upto 400MB; (4times*file reaches 100MB)? and also what could be the purpose of postrotate?
I'm confuse about different beetwen console and terminal in linux system? And what purpose them for?
View 5 Replies View RelatedAt my Uni, we use a web-based login for our internet connections. Its based off of Cisco, and every Wednesday night every computer on campus must re-enter their credentials to use the network.
Normally on my several computers I simply pull up the Terminal, point links to google.com using
Code:
And enter my credentials when Cisco redirects to the login page.
Literally, the process is
Code:
Then ENTER to accept the redirect, down arrow to skip over the logo image, USERNAME, ENTER, PASSWORD, ENTER, ENTER.
Naturally, this is EXTREMELY time consuming, as I have about 5 computers located around campus and must physically walk to the machines and login every single week.
My question is, How would I formulate a program that does the following;
1) checks for connectivity (i.e. is able to reach/resolve to the greater part of the internet) and
2) automatically fills in the credentials on the links login page?
I have a personal wiki of notes, with now thousands of links in markdown format:
[link text](http://example.com)
but now that fckeditor is available for mediawiki (very beta), it has become much better to just stick with wikitext format. There are only a few conversions to do: tables, links, and bulleted lists. The lists are a fairly simple regex and fckeditor magically reformats the tables, so all I'm left with is the links. But I'm not a regex master. How do I reformat code...
What good does getting into single user mode do?And what's the basic purpose of it , i.e is it maintaining purpose???
View 2 Replies View Related