Suppose I have file in linux OS the absolute path of which is:
What will be the absolute path of this file in MAC OS?
Any good link which which explain the absolute path format in MAC?
Hi,
I have a file with about 60 lines of path:
app-defaults/boxXYZ.......
I want to change this to /my/path/goes/here/app-defaults/boxXYZ, but of course vi doesn't like the regualr :s/old/new/ command.
Is there any other quick way to do this?
Thanks ;) (2 Replies)
using OS X and the Terminal, I'd like to find all locked files in a specified directory, unlock them, and print a list of those files that were unlocked
how can I do this?
I'm familiar with chflags nouchg for unlocking one file but not familiar with unix enough to do what I'd like.
Thanks! (0 Replies)
Hi,
I have a file abcd.txt which has contents in the form of full path file names i.e.
$home> vi abcd.txt
/a/b/c/r1.txt
/q/w/e/r2.txt
/z/x/c/r3.txt
Now I want to retrieve only the directory path name for each row
i.e
/a/b/c/
/q/w/e/
How to get the same through shell script?... (7 Replies)
Hello,
Glad I found this forum....
Well I'm starting using UNIX tools in macOS for bioinformatics (Python....).
I know that in UNIX every installed tools go to usr/bin.... But since in mac I do not have access to it I wanted to know were to create and install tools? Can I recreate a pseudo UNIX... (3 Replies)
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Hello,
I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
I'm curious to know how do I add an empty log file (test1.log) to an existing text file to monitor all the changes made to a.txt.
Is this expression
export PATH=$PATH:/home/test1.log
right to be added to the text file a.txt? (5 Replies)
Discussion started by: TestKing
5 Replies
LEARN ABOUT CENTOS
symlinks
SYMLINKS(8) System Manager's Manual SYMLINKS(8)NAME
symlinks - symbolic link maintenance utility
SYNOPSIS
symlinks [ -cdorstv ] dirlist
DESCRIPTION
symlinks is a useful utility for maintainers of FTP sites, CDROMs, and Linux software distributions. It scans directories for symbolic
links and lists them on stdout, often revealing flaws in the filesystem tree.
Each link is output with a classification of relative, absolute, dangling, messy, lengthy, or other_fs.
relative links are those expressed as paths relative to the directory in which the links reside, usually independent of the mount point of
the filesystem.
absolute links are those given as an absolute path from the root directory as indicated by a leading slash (/).
dangling links are those for which the target of the link does not currently exist. This commonly occurs for absolute links when a
filesystem is mounted at other than its customary mount point (such as when the normal root filesystem is mounted at /mnt after booting
from alternative media).
messy links are links which contain unnecessary slashes or dots in the path. These are cleaned up as well when -c is specified.
lengthy links are links which use "../" more than necessary in the path (eg. /bin/vi -> ../bin/vim) These are only detected when -s is
specified, and are only cleaned up when -c is also specified.
other_fs are those links whose target currently resides on a different filesystem from where symlinks was run (most useful with -r ).
OPTIONS -c convert absolute links (within the same filesystem) to relative links. This permits links to maintain their validity regardless of
the mount point used for the filesystem -- a desirable setup in most cases. This option also causes any messy links to be cleaned
up, and, if -s was also specified, then lengthy links are also shortened. Links affected by -c are prefixed with changed in the
output.
-d causes dangling links to be removed.
-o fix links on other filesystems encountered while recursing. Normally, other filesystems encountered are not modified by symlinks.
-r recursively operate on subdirectories within the same filesystem.
-s causes lengthy links to be detected.
-t is used to test for what symlinks would do if -c were specified, but without really changing anything.
-v show all symbolic links. By default, relative links are not shown unless -v is specified.
BUGS
symlinks does not recurse or change links across filesystems.
AUTHOR
symlinks has been written by Mark Lord <mlord@pobox.com>, the original developer and maintainer of the IDE Performance Package for linux,
the Linux IDE Driver subsystem, hdparm, and a current day libata hacker.
SEE ALSO symlink(2)Version 1.4 October 2008 SYMLINKS(8)