General :: Get The Pathname Of The File And Its Links?

Dec 21, 2010

i 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

View 14 Replies


ADVERTISEMENT

General :: Downloading All Links In An XML File?

May 26, 2011

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 Related

General :: What Is The Purpose Of Using Hard Links Instead Of Being A Shortcut To Some File

Mar 23, 2011

what is the purpose of using hard links instead of being a shortcut to some file ?

View 5 Replies View Related

General :: Remove All The <a Href Links From Text File?

Mar 24, 2010

[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?

View 2 Replies View Related

General :: Create Hard Links Within A File System To A Directory?

Aug 1, 2010

I 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 Related

General :: Write A Workable Script That Demonstrates That Variable Expansion Occurs Before Pathname Expansion?

Jul 23, 2011

how do I write a workable script that demonstrates that variable expansion occurs before pathname expansion

View 14 Replies View Related

CentOS 5 Networking :: Allow The User Only See The Size Of The File, And Not The File + Symbolic Links?

Feb 23, 2009

I'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 Related

Ubuntu :: Links Browser Script - Automatically Fills In The Credentials On The Links Login Page?

Dec 6, 2010

At 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?

View 2 Replies View Related

Programming :: Scripting : Change Markdown Links To Wikitext Links?

Feb 3, 2009

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...

View 12 Replies View Related

Fedora :: Error 1: Filename Must Be Either An Absolute Pathname Or Blocklist

Jul 26, 2009

I get the following error when I try to boot vista thru grub. This is what I did, Got a new Hard drive installed it. Configured the bios to look at the new hard drive first. after installing vista on the new hard drive I switched the boot order and added the lines for vista(last 3 lines) in /boot/grub/grub.conf. I get the following the following error.I have to change the bios everytime i have to boot vista.

error 1: Filename must be either an absolute pathname or blocklist
#boot=/dev/sda
default=0
timeout=15
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.29.6-213.fc11.x86_64)

[Code]...

View 3 Replies View Related

Fedora :: Logged In As Root - What Is The Home Directory Pathname

Aug 23, 2010

Im logged in as root in Fedora, What is the home directory pathname?

View 2 Replies View Related

Networking :: Set File Links On Website Via Ftp Or Php?

Apr 8, 2011

My hosting server is running Linux / Apache. It would be very nice to be able to link some files (preferably hard links, but symbolic links also would help), but haven't a clue how to do so. I would be willing to write a server side php script if that would do the trick.

View 4 Replies View Related

Server :: Identifying Links To A File?

Dec 23, 2010

How do we check as to how many links have been created that point to a particular file?

Let's say there is this file /work/contacts.dat

and we have, let's say, 10 soft links that have been created by different users in their home directories. Now how can I figure by looking at the file /work/contacts.dat that there are 10 (soft or hard)links pointing to this particular file so that I know that it is being used or refered to by those many users and before deleting it I can check with them.

View 3 Replies View Related

Fedora Security :: Invalid XINETD_CONF_PATH Configuration Option - Non-existent Pathname

Mar 10, 2010

i install from

yum install rkhunter

rkhunter 1.3.6-4.fc12

Invalid XINETD_CONF_PATH configuration option - non-existent pathname

View 2 Replies View Related

Ubuntu :: Insert Pictures In ODF File, Not Internet Links To Them

May 30, 2011

When I copy and paste something from a web site, links to pictures are inserted, not actual pictures.

When I disconnect from the Internet, I cannot see pictures which is annoying.

Do you know how to make LibreOffice copy and paste actual pictures into a Writer document?

View 2 Replies View Related

Fedora Security :: Invalid XINETD_CONF_PATH Configuration Option - Non-existent Pathname Specified: /etc/xinetd.conf?

Mar 24, 2010

I'm just trying to figure out what is going on with FC12
Here is the error:

[root@localhost bigmac]# rkhunter --check
Invalid XINETD_CONF_PATH configuration option - non-existent pathname specified: /etc/xinetd.conf

View 1 Replies View Related

General :: /etc/rc.d Directory Soft Links / Purpose Of Soft Links In /etc Directory?

Feb 20, 2011

I 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 ...

View 3 Replies View Related

General :: Scp + Copy The Same Links?

Jan 14, 2011

why scp command not copy links from local copmuter to other ( how to copy the links)as scp -rp dir linux:/dir_targetremark in dir I have files and links

View 1 Replies View Related

General :: Add A Permanent Association To Links?

Feb 23, 2010

I'm using Links on a Ubuntu server, and to view images I'm using Asciiview, which works well, but the association is not retained whenever I close links. How can I retain this association?

View 1 Replies View Related

General :: How To Copy Symbolic Links

May 7, 2010

I have directory that contains some symbolic links:

user@host:include$ find .. -type l -ls
4737414 0 lrwxrwxrwx 1 user group 13 Dec 9 13:47 ../k0607-lsi6/camac -> ../../include
4737415 0 lrwxrwxrwx 1 user group 14 Dec 9 13:49 ../k0607-lsi6/linux -> ../../../linux

[code]....

View 5 Replies View Related

General :: Links Don't Work After Mount?

Jul 26, 2010

I work in a lab when all the guys use PCs with Windows and access the lab linux servers via ssh.

I prefer linux, so I have a local installation of ubuntu 10.4 on my PC. I mount the home of our lab server using mount server:/home /mnt/home/. I can then access the files on the server (I had to change my local UID to match the one assigned to me on our server in order to be able to write to my home dir).

The problem is all the (symbolic) links I have on the server don't work when I access them through the mounted location. I guess the system simply tries following the link in my local /home instead on server:/home.

View 1 Replies View Related

General :: Tar ~ Restore Of Symbolic Links?

Mar 2, 2011

Just wondering what the command is to archive data plus symbolic links in tar. We need to be able to recreate symbolic links as the file is laid back to original location(s).

View 2 Replies View Related

General :: Links Command Not Working

Nov 23, 2010

I read and saw a video that says that typing in 'links' command followed by a website, will open a site in terminal.

However, when I type in the links command, terminal returns the error 'bash: links: command not found'.

What package or library needs to be installed to get this command to work.

View 2 Replies View Related

General :: Links Don't Work After Mount

Jul 26, 2010

I have a local installation of ubuntu 10.4 on my PC. I mount the home of our lab server using mount server:/home /mnt/home/. I can then access the files on the server (I had to change my local UID to match the one assigned to me on our server in order to be able to write to my home dir). The problem is all the (symbolic) links I have on the server don't work when I access them through the mounted location. I guess the system simply tries following the link in my local /home instead on server:/home. Is there a way to make the links work?

View 5 Replies View Related

General :: Symbolic Links With Dots?

Feb 24, 2011

what exactly does the following symbolic link mean?"target ->/path/to/./usr/bin/example"I am a bit confused on the "." portion of it.

View 1 Replies View Related

General :: How To Download With Wget Without Following Links With Parameters

Jun 29, 2010

I'm trying to download two sites for inclusion on a CD:URL...The problem I'm having is that these are both wikis. So when downloading with e.g.:wget -r -k -np -nv -R jpg,jpeg, gif,png, tif URL..Does somebody know a way to get around this?

View 2 Replies View Related

General :: Replace Symbolic Links With Files?

Jun 28, 2011

Is there an easy way to replace all symbolic links with the file they link to?

View 4 Replies View Related

General :: Copy Only Symbolic Links Between Homes?

Mar 27, 2011

copy all symlinks

i want to copy all symlinks (both active and dead) from one partition's os's user's home directory, to another partition's os's user's home directory, and i'm wondering if this can be accomplished with some clever bash options and pipes after "cp".

this is very useful for users with multiboot systems, who keep all their data on a separate drive. this would allow the symlink'ed shortcut tree directory hierarchy expedience, to be instantly copyable to any of their oses.

distro-hoppers/surfers will love it. ^_^

so here goes my first attempt at trying to work out what it'd be...

cp -P
(copy, dont follow symbolic links)
(or is it -d i aught use?)
find /% -type l
(finds symbolic links only

[Code]....

View 5 Replies View Related

General :: Cannot Get Links To Work From Internal Webpage

Jun 6, 2011

I just setup my first Linux box using [URL] everything went along fine except now I have a problem that I cannot seem to solve. I've set up a webpage on the box for my company's intra-net for testing purposes but I cannot get the links to work. On the server itself all the links work but Firefox still ask me to authenticate with the Adobe Flashplayer (player10), but when I access the page from another computer I have the following issues:-

1. Even though hostname -f shows the a fully qualified domain name I have to use the IP Address eg. 192.168.100.100
2. I can access the page but the links leading to the other pages do not work I get "Webpage cannot be found or the HTTP 404 Not Found" Error Message
3. None of the embedded pictures show up I get the red X.

View 3 Replies View Related

General :: Difference Between Hardlinks And Soft Links?

Jul 1, 2011

whats the difference between hard links and soft links?

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved