IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

unlink (2)

UNLINK(2)                  Linux Programmer's Manual                 UNLINK(2)



NAME
       unlink - delete a name and possibly the file it refers to

SYNOPSIS
       #include<unistd.h>

       intunlink(constchar*pathname);

DESCRIPTION
       unlink  deletes  a  name from the filesystem. If that name was the last
       link to a file and no processes have the file open the file is  deleted
       and the space it was using is made available for reuse.

       If  the  name  was the last link to a file but any processes still have
       the file open the file will remain in existence  until  the  last  file
       descriptor referring to it is closed.

       If the name referred to a symbolic link the link is removed.

       If  the  name  referred  to a socket, fifo or device the name for it is
       removed but processes which have the object open may  continue  to  use
       it.

RETURNVALUE
       On  success,  zero is returned.  On error, -1 is returned, and errno is
       set appropriately.

ERRORS
       EACCES Write access to the directory containing pathname is not allowed
              for  the  process's  effective uid, or one of the directories in
              pathname did not allow search (execute) permission.

       EPERM or EACCES
              The directory containing pathname has the  sticky-bit  (S_ISVTX)
              set  and  the  process's effective uid is neither the uid of the
              file to be deleted nor that of the directory containing it.

       EPERM (Linux only)
              The filesystem does not allow unlinking of files.

       EPERM  The system does not allow unlinking of directories, or unlinking
              of  directories  requires  privileges  that  the current process
              doesn't have.  (This is the POSIX prescribed error return.)

       EISDIR pathname refers to a directory.  (This is  the  non-POSIX  value
              returned by Linux since 2.1.132.)

       EBUSY (not on Linux)
              The file pathname cannot be unlinked because it is being used by
              the system or another process and the  implementation  considers
              this an error.

       EFAULT pathname points outside your accessible address space.

       ENAMETOOLONG
              pathname was too long.

       ENOENT A component in pathname does not exist or is a dangling symbolic
              link, or pathname is empty.

       ENOTDIR
              A component used as a directory in pathname is not, in  fact,  a
              directory.

       ENOMEM Insufficient kernel memory was available.

       EROFS  pathname refers to a file on a read-only filesystem.

       ELOOP  Too  many  symbolic  links were encountered in translating path-
              name.

       EIO    An I/O error occurred.

CONFORMINGTO
       SVr4, SVID, POSIX, X/OPEN, 4.3BSD.   SVr4  documents  additional  error
       conditions EINTR, EMULTIHOP, ETXTBSY, ENOLINK.

BUGS
       Infelicities  in  the  protocol underlying NFS can cause the unexpected
       disappearance of files which are still being used.

SEEALSO
       link(2), rename(2), open(2), rmdir(2), mknod(2), mkfifo(3),  remove(3),
       rm(1)



Linux 2.0.30                      1997-08-21                         UNLINK(2)

_Exitgetsockoptoutwshmat
_exitgettidoutw_pshmctl
_llseekgettimeofdaypauseshmdt
_newselectgetuidpersonalityshmget
_sysctlgttypipeshmop
acceptidlepivot_rootshutdown
accessinbpollsigaction
acctinb_pprctlsigaltstack
adjtimexinlpreadsigblock
afs_syscallinl_pprofsiggetmask
alarminsbpselectsigmask
alloc_hugepagesinslptracesignal
arch_prctlinswpwritesigpause
bdflushintroquotactlsigpending
bindinwreadsigprocmask
breakinw_preaddirsigqueue
brkioctlreadlinksigreturn
cacheflushioctl_listreadvsigsetmask
capgetiopermrebootsigsuspend
capsetioplrecvsigtimedwait
chdiripcrecvfromsigvec
chmodkillrecvmsgsigwaitinfo
chownkillpgrenamesocket
chrootlchownrmdirsocketcall
clonelinksbrksocketpair
closelistensched_get_priority_maxssetmask
connectllseeksched_get_priority_minstat
creatlocksched_getaffinitystatfs
duplseeksched_getparamstime
dup2lstatsched_getschedulerstty
execvemadvisesched_rr_get_intervalswapoff
exitmincoresched_setaffinityswapon
fchdirmkdirsched_setparamsymlink
fchmodmknodsched_setschedulersync
fchownmlocksched_yieldsyscall
fcntlmlockallselectsyscalls
fdatasyncmmapselect_tutsysctl
flockmmap2semctlsysfs
forkmodify_ldtsemgetsysinfo
free_hugepagesmountsemopsyslog
fstatmprotectsendtime
fstatfsmpxsendfiletimes
fsyncmremapsendmsgtkill
ftruncatemsgctlsendtotruncate
futexmsggetsetcontextumask
getcontextmsgopsetdomainnameumount
getdentsmsgrcvsetegidumount2
getdomainnamemsgsndseteuiduname
getdtablesizemsyncsetfsgidundocumented
getegidmunlocksetfsuidunimplemented
geteuidmunlockallsetgidunlink
getgidmunmapsetgroupsuselib
getgroupsnanosleepsethostidustat
gethostidnfsservctlsethostnameutime
gethostnamenicesetitimerutimes
getitimerobsoletesetpgidvfork
getpagesizeoldfstatsetpgrpvhangup
getpeernameoldlstatsetpriorityvm86
getpgidoldoldunamesetregidwait
getpgrpoldstatsetresgidwait3
getpidoldunamesetresuidwait4
getppidopensetreuidwaitpid
getpriorityoutbsetrlimitwrite
getresgidoutb_psetsidwritev
getresuidoutlsetsockopt 
getrlimitoutl_psettimeofday 
getrusageoutsbsetuid 
getsidoutslsetup 


Claws Mail 3.7.2
Email client (and news reader), based on GTK+
Samba 3.4.0
Provides file and print services to SMB/CIFS clients
Amaya 11.2
Complete web browsing and authoring environment
Linux Kernel 2.6 2.6.30.1
Linux Kernel
Scintilla 1.79
Free source code editing component
Sawfish 1.5.0
An extensible window manager
ImageMagick 6.5.4.2
ImageMagick image processing studio
Wine 1.1.25
Free implementation of Windows on Unix
GEdit 2.26.3
Small but powerful text editor
WebGUI 7.7.13
A fully featured content management system.
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info