Sponsored Content
Full Discussion: ls
Top Forums UNIX for Dummies Questions & Answers ls Post 26398 by RTM on Friday 16th of August 2002 09:51:13 AM
Old 08-16-2002
Read the Man Page - the find command has the means to grab the files and move them, delete them, or rename them.

Part of the man page -

Remove all files in your home directory named a.out or *.o
that have not been accessed for a week:

example% find $HOME \( -name a.out -o -name '*.o' \) \
-atime +7 -exec rm {} \;

Note the last portion - -exec rm - you can change that to what you need. Practice on a test directory until you understand it. When I first started in UNIX (from VAX/VMS) my new boss had me write a script to rename soft links to hard links. I killed my test system one time because I forgot the \; on the end (or messed it up somehow). Anyway, his whole point was to teach me UNIX does not forgive - you tell it to do something screwy, it will.
 
symlink(4)						     Kernel Interfaces Manual							symlink(4)

NAME
symlink - symbolic link DESCRIPTION
A symbolic (or soft ) link is a file whose name indirectly refers (points) to a relative or absolute path name. During path name interpretation, a symbolic link to a relative path name is expanded to the path name being interpreted, and a symbolic link to an absolute path name is replaced with the path name being interpreted. Thus, given the path name If is a symbolic link to a relative path name such as the path name is interpreted as If is a symbolic link to an absolute path name such as the path name is interpreted as All symbolic links are interpreted in this manner, with one exception: when the symbolic link is the last component of a path name, it is passed as a parameter to one of the system calls: or (see readlink(2), rename(2), symlink(2), unlink(2), chown(2) and lstat(2)). With these calls, the symbolic link, itself, is accessed or affected. Unlike normal (hard) links, a symbolic link can refer to any arbitrary path name and can span different logical devices (volumes). The path name can be that of any type of file (including a directory or another symbolic link), and may be invalid if no such path exists in the system. (It is possible to make symbolic links point to themselves or other symbolic links in such a way that they form a closed loop. The system detects this situation by limiting the number of symbolic links it traverses while translating a path name.) The mode and ownership of a symbolic link is ignored by the system, which means that affects the actual file, but not the file containing the symbolic link (see chmod(1)). Symbolic links can be created using or (see ln(1) and symlink(2)). AUTHOR
was developed by HP and the University of California, Berkeley. SEE ALSO
cp(1), symlink(2), readlink(2), link(2), stat(2), mknod(1M). symlink(4)
All times are GMT -4. The time now is 08:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy