Sponsored Content
Top Forums Shell Programming and Scripting print summary of directory, and group all symbolic links Post 302502024 by alister on Sunday 6th of March 2011 03:06:51 PM
Old 03-06-2011
You could replace
Code:
cut -d ":" -f 2

with
Code:
sed 's/[^:]*://; s/^ symbolic link to.*/ symbolic link/'

In all cases, it removes everything up to the first colon, inclusive. In the case of symbolic link, it'll strip away everything beginning with the space after "symbolic link".

Except for deleting the target of a symbolic link, it should yield output identical to your cut approach so that subsequent commands require no modification.

Regards,
Alister
These 2 Users Gave Thanks to alister For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Finding symbolic links

How can I find all symbolic links across the network to a directory (2 Replies)
Discussion started by: mehtad
2 Replies

2. UNIX for Dummies Questions & Answers

Symbolic Links for a File

how do i get the list of symbolic link names for a particular file programatically (4 Replies)
Discussion started by: b_u_n_1234
4 Replies

3. UNIX for Dummies Questions & Answers

Too many levels of symbolic links

Hi, Is there a limit to the number of symbolic links you can have? I tried to vi the symbolic link relating to a file and got the following error: "filename" Too many levels of symbolic links There is only one symbolic link to one file in this case, but there are >2000 other links to... (2 Replies)
Discussion started by: Bab00shka
2 Replies

4. Programming

Ignoring symbolic/hard links while scanning through a directory

Hi, I am writing a unix system utility that is supposed to scan through a directory, collecting information about the files and subdirectories. That part is going well. The tricky part is that some files in the directory are hard links or symbolic links. I am supposed to IGNORE these links.... (4 Replies)
Discussion started by: Yifan_Guo
4 Replies

5. AIX

Symbolic Links

I am linking a directory as follows: ln -sf /home/xxx/userid/real_files/* /home/xxx/userid/linked_files This gives me symbolic links for all the files in the real_files directory in the linked_files directory. My question is, if I go and remove a file in the real_files directory and then go... (1 Reply)
Discussion started by: rcarnesiii
1 Replies

6. UNIX for Dummies Questions & Answers

Symbolic links between directories

Hi all, lets consider 2 directories test1 and test2. I want to link test2 to point to test1, how do u do this? (4 Replies)
Discussion started by: Mr. Zer0
4 Replies

7. UNIX for Dummies Questions & Answers

Symbolic Links

Hi all, I have scoured the entire forum for this but to no avail unfortunately. Basically, I would like to remove my symbolic link from my folder name i.e. foldername -> /a/b/c/d/f where f is indeed a folder. I have tried rmdir but this does not work and in actual fact deletes the... (4 Replies)
Discussion started by: cyberfrog
4 Replies

8. UNIX for Dummies Questions & Answers

Permissioning for symbolic links

I've just started using UNIX in a Linux vmplayer. I'm trying to run the command: ln -s `pwd`/$1 `python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"`/$1 in a script from an online tutorial, but I keep getting an error message: ln: creating symbolic link... (1 Reply)
Discussion started by: ChipT
1 Replies

9. UNIX for Dummies Questions & Answers

Symbolic links in UNIX

Hi, I have a file with more than 1 layers of soft links for it. For ex. ls -la .profile .profile@ -> /home/act/.profile_abc ls -la /home/act/.profile_abc@ -> .profile_final I want to get the name of the last file (i.e. .profile_final) when I refer to .profile using shell script. I... (2 Replies)
Discussion started by: deo_kaustubh
2 Replies

10. Solaris

Symbolic links

Soft link,Hard link brief explanation (1 Reply)
Discussion started by: RAJU KAVATI
1 Replies
update-boinc-applinks(1)												  update-boinc-applinks(1)

NAME
update-boinc-applinks - create/remove symbolic links for anonymous BOINC applications SYNOPSIS
update-boinc-applinks [options] DESCRIPTION
update-boinc-applinks creates (or removes) symbolic links for anonymous BOINC applications and their associated app_info.xml files in a given BOINC data directory. Note: update-boinc-applinks is an extension for Debian users and is only available in Debian's boinc-client package. OPTIONS
For a full summary of options, run update-boinc-applinks --help. -h, --help Show help message and all options. --create Create symbolic links and project directories. --remove Remove symbolic links and empty project directories. --data-dir=DIR Manage symbolic links in the given directory DIR. If this option is not present, DIR defaults to the current working directory. --project=PROJECT Manage symbolic links only for the given project PROJECT. Run update-boinc-applinks --list-projects to get a list of projects for which anonymous applications are available and therefore can be replaced with PROJECT. If this option is not present, update-boinc- applinks will manage symbolic links for all available projects. --list-projects Show a list of projects for which anonymous applications are available. Normally those applications are provided by packages called boinc-app-PROJECT (e.g. boinc-app-seti). AUTHOR
Written by Frank S. Thomas. COPYRIGHT
Copyright (C) 2006, 2008 Debian BOINC Maintainers. This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. 13 January 2008 update-boinc-applinks(1)
All times are GMT -4. The time now is 10:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy