12-11-2011
This User Gave Thanks to dude2cool For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I would like to be able to delete the first n lines of a file from inside of a ksh script. I am not sure how to achieve this or if it is possible. Could someone please help. Thanks in advance. (5 Replies)
Discussion started by: rehoboth
5 Replies
2. UNIX for Advanced & Expert Users
Hi
I have a strange problem. Sometimes when I execute the below command something wierd happens.
rsync -avz -e ssh travegre@travegre.net: ../travegre.net/
the folder named "hm" that is held in travegre.net and is coppied along with all the other folders and data at travegre.net, gets... (1 Reply)
Discussion started by: travegre
1 Replies
3. UNIX for Advanced & Expert Users
Hi
I have a strange problem. Sometimes when I execute the below command something wierd happens.
rsync -avz -e ssh travegre@travegre.net: ../travegre.net/
the folder named "hm" that is held in travegre.net and is coppied along with all the other folders and data at travegre.net, gets deleted... (4 Replies)
Discussion started by: travegre
4 Replies
4. UNIX for Dummies Questions & Answers
I need a shell script that accepts 2 directories names bar1 and bar2
as arguments , and deletes those files in bar2 which are are identical to their name
spaces in bar1.
I tried with this code but it gives error.
if
then
echo " syntax <comnd dir1 dir2 > "
exit
else
... (6 Replies)
Discussion started by: krishnampkkm
6 Replies
5. Shell Programming and Scripting
I want to write a script that deletes files inside the dir. However, the script
should also allow the user to confirm by pressing (d) key before deleting files..
#!/bin/bash
for file in $1/*
do
size='ls -l $file | cut -f 5 -d " "'
name='ls -l $file | cut -f 9 -d " "'
... (1 Reply)
Discussion started by: herberwz
1 Replies
6. UNIX for Advanced & Expert Users
I have a complex multi-stage (media conversion and formatting) build process that leaves orphan target files needing deleting automatically (i.e. by reference only to the build rules themselves, not any parallel config) upon each regular build. Since MAKE cannot do this, what can? Thanks. (4 Replies)
Discussion started by: chrisjj
4 Replies
7. Shell Programming and Scripting
Hi
I am using sed command to make SCORE=somevalue to SCORE=blank in a file.
Please see the attached lastline.txt file. After executing the below command on the file, it removes the last line.
cat lastline.txt | sed 's/SCORE=.*$/SCORE=/g' > newfile.txt
Why does sed command remove the... (3 Replies)
Discussion started by: ashok.k
3 Replies
8. Slackware
I am using Tbird as it came with Slackware 13.37 and everytime I send something I get a message 1 or 2 drafts deleted. Should it be doing that? If not has this been reported ? How can I find out if it was reported? I have no drafts to delete. (2 Replies)
Discussion started by: slak0
2 Replies
9. UNIX for Dummies Questions & Answers
Hi
It happens when I try to delete a file of 250MB with the command rm -r on our old Intergraph CLIX that the filename disappears while the blocks remain on the machine. Only when I reboot the system the blocks really disappear. Then rm works again for sometime but after some time it happens... (15 Replies)
Discussion started by: hausi2012
15 Replies
10. OS X (Apple)
It deletes my .bashrc file rarely but predictability after some unknown count of Mac's restarts. Has someone ever faced such behavior?
How do I prevent OS X from modifying .bashrc? What ownership/permission should I set up to not let it happen?
OS X Lion. (6 Replies)
Discussion started by: scrutinizerix
6 Replies
LEARN ABOUT OSX
mount_afp
MOUNT_AFP(8) BSD System Manager's Manual MOUNT_AFP(8)
NAME
mount_afp -- mount an afp (AppleShare) filesystem
SYNOPSIS
mount_afp [-i] [-s] [-k] [-o options] afp_url node
DESCRIPTION
The mount_afp command mounts the AFP volume denoted by the afp_url afp://[user[;AUTH=uamname][:password]@]host[:port]/volumename at the mount
point indicated by node.
This command is normally executed by mount(8) when the -t afp option is used. If the -i option is not used, all the required information to
establish a login to the remote server must be available in the afp URL, including username & password if needed.
The arguments and options are:
-i Interactive mode, you are prompted for the password if you did not supply one in the url.
-s Soft mount (default). Network errors, e.g. timeouts, will be retried for a much shorter amount of time. If the network errors per-
sist, then the mount will be force unmounted.
-k Hard mount. Network errors, e.g. timeouts, will be retried for an extended amount of time. If the network errors persist, then the
mount will be force unmounted.
-o Options passed to mount(2) are specified with the -o option followed by a comma separated string of options. See the mount(8) man
page for possible options and their meanings. Additional options supported by the AFP Client are as follows:
nobrowse
Indicate to the Carbon subsystem that this volume is not to be displayed to the user.
automounted
Set flags on the mountpoint to indicate that the volume has been mounted by the automounter.
afp_url
There are two forms of afp URL, one for TCP/IP and one for AppleTalk:
afp://[user[;AUTH=uamname][:password]@]host[:port]/volume
afp:/at/[user[;AUTH=uamname][:password]@]servername[:zonename]/volume
Denotes the afp server and sharepoint to mount. It may also contain the username & password required to log into the server. uamname
is the protocol name of the authentication method. If port is not specified, then port 548 is used.
node Path to mount point, which must be a directory that the user has write permissions for.
EXAMPLES
The following example illustrates how to mount the afp volume server.company.com/volumename/ at the mount point /Volumes/mntpnt:
mkdir /Volumes/mntpnt
mount_afp afp://username:userpass@server.company.com/volumename/ /Volumes/mntpnt
This example shows the proper url to use to mount the volume guestVolume from the afp server myserver as guest (if no uam and no username,
then use guest uam):
mkdir /Volumes/guest
mount_afp "afp://myserver/guestVolume" /Volumes/guest
This example shows the proper url to use to mount the volume myVolume from the afp server myserver using Kerberos authentication:
mkdir /Volumes/myVolume
mount_afp "afp://;AUTH=Client%20Krb%20v2@myserver/myVolume" /Volumes/myVolume
SEE ALSO
mount(2), unmount(2), mount(8)
HISTORY
The mount_afp command first appeared Mac OS X version 10.0. Kerberos authentication was added in Mac OS X version 10.2
RETURN VALUES
0 mount_afp successfully mounted the volume directory.
[ENODEV (19)] The server volume could not be mounted by mount_afp because the server was not found or because the sharepoint does not
exist, or because node does not have proper access.
[EACCES (13)] The volume could not be mounted by mount_afp because the user did not provide proper authentication credentials.
[ENOTDIR (20)] The volume could not be mounted by mount_afp because the mountpoint was not a directory.
Mac OS X May 8, 2002 Mac OS X