請問Linux C中,與OS指令興同的同名function,跟一般指令是相同的嗎? [論壇 - Ubuntu 程式設計]


正在瀏覽:   1 名遊客


 到底部   前一個主題   下一個主題  [無發表權] 請登錄或者註冊



請問Linux C中,與OS指令興同的同名function,跟一般指令是相同的嗎?
會員三級
註冊日期:
2016/4/18 12:29
所屬群組:
已註冊使用者
等級: 9
HP : 0 / 217
MP : 38 / 1695
EXP: 70
離線
Hi,

因為常常需要在程式中,加入OS指令的相同function
因此想詢問,在Linux C中,建立資料夾,會使用mkdir function,想請問該function與OS指令的"mkdir",兩著是否有不同的地方?
我知道功能一樣,但我想知道是否有其他不同的地方
感謝各位撥冗觀看
謝謝

11/14 12:03:48
應用擴展 工具箱
回覆: 請問Linux C中,與OS指令興同的同名function,跟一般指令是相同的嗎?
會員五級
註冊日期:
2012/4/22 10:50
所屬群組:
已註冊使用者
等級: 34
HP : 165 / 829
MP : 545 / 16145
EXP: 19
離線
之前我並沒深入去探索這一段,剛好看到您的提問,

以下紀錄一些探索的起點,供您參考。

以下測試的環境是「Ubuntu 18.04」。

================================================================================

若要找「c function mkdir」的文件,可以執行下面指令


$ man 3 mkdir



或是執行


$ man 3posix mkdir



要執行上面的指令,必須先安裝「manpages-posix-dev」這個「Package」。
也就是執行「$ sudo apt-get install manpages-posix-dev」安裝。

================================================================================

另外也可以執行下面指令


$ man 2 mkdir



要執行上面這個指令,必須先安裝「manpages-dev」這個「Package」。
也就是執行「$ sudo apt-get install manpages-dev」安裝。

================================================================================

若要找「指令 mkdir」的文件,可以執行下面指令


$ man 1 mkdir



關於「mkdir」的文件和指令,則是是來自於「coreutils」這個「Package」

執行


$ dpkg -L coreutils | grep mkdir



顯示


/bin/mkdir
/usr/share/man/man1/mkdir.1.gz



================================================================================

也可以執行下面指令,觀看「指令 mkdir」來自於「posix」的文件


$ man 1posix mkdir



要執行上面這個指令,必須先安裝「manpages-posix」這個「Package」。
也就是執行「$ sudo apt-get install manpages-posix」安裝。

================================================================================

接下來下載「SourcePackage: coreutils」來觀看「指令 mkdir」的「Source Code」。

執行


$ apt-get source coreutils



會下載下面四個檔案

* coreutils_8.28-1ubuntu1.debian.tar.xz
* coreutils_8.28-1ubuntu1.dsc
* coreutils_8.28.orig.tar.xz
* coreutils_8.28.orig.tar.xz.asc

並且解開到「coreutils-8.28」這個資料夾。

註: 要執行「apt-get source」的前置作業,請參考之前寫的「這篇」或是「這篇」。

接下來執行下面指令,切換到「coreutils-8.28」這個資料夾


$ cd coreutils-8.28



================================================================================

使用「mkdir」當做關鍵字,來探索「src/mkdir.c」這個檔案,執行下面指令


$ grep 'mkdir' src/mkdir.c -n



顯示


1:/* mkdir -- make directories
28:#include "mkdir-p.h"
37:#define PROGRAM_NAME "mkdir"
85:struct mkdir_options
109:announce_mkdir (char const *dir, void *options)
111:  struct mkdir_options const *o = options;
124:  struct mkdir_options const *o = options;
135:  int r = mkdir (component, S_IRWXUGO);
138:      int mkdir_errno = errno;
140:      errno = mkdir_errno;
145:      announce_mkdir (dir, options);
154:  struct mkdir_options const *o = options;
166:                               o->mode, announce_mkdir,
194:  struct mkdir_options options;
256:  /* FIXME: This assumes mkdir() is done in the same process.




================================================================================

使用「int r = mkdir」當做關鍵字,來探索「src/mkdir.c」這個檔案,執行下面指令


$ grep 'int r = mkdir' src/mkdir.c -B 14 -n



顯示


121-static int
122-make_ancestor (char const *dir, char const *component, void *options)
123-{
124-  struct mkdir_options const *o = options;
125-
126-  if (o->set_security_context && defaultcon (component, S_IFDIR) < 0
127-      && ! ignorable_ctx_err (errno))
128-    error (0, errno, _("failed to set default creation context for %s"),
129-           quoteaf (dir));
130-
131-  mode_t user_wx = S_IWUSR | S_IXUSR;
132-  bool self_denying_umask = (o->umask_value & user_wx) != 0;
133-  if (self_denying_umask)
134-    umask (o->umask_value & ~user_wx);
135:  int r = mkdir (component, S_IRWXUGO);




================================================================================

使用「make_ancestor」當做關鍵字,來探索「src/mkdir.c」這個檔案,執行下面指令


$ grep 'make_ancestor' src/mkdir.c -n



顯示


89:  int (*make_ancestor_function) (char const *, char const *, void *);
122:make_ancestor (char const *dir, char const *component, void *options)
159:      if (! o->make_ancestor_function && defaultcon (dir, S_IFDIR) < 0
165:  int ret = (make_dir_parents (dir, wd, o->make_ancestor_function, options,
177:      && o->make_ancestor_function)
196:  options.make_ancestor_function = NULL;
215:          options.make_ancestor_function = make_ancestor;
274:  if (options.make_ancestor_function || specified_mode)




================================================================================

使用「options.make_ancestor_function = make_ancestor」當做關鍵字,來探索「src/mkdir.c」這個檔案,執行下面指令


$ grep 'options.make_ancestor_function = make_ancestor' src/mkdir.c -B 28 -n



顯示


187-
188-int
189-main (int argc, char **argv)
190-{
191-  const char *specified_mode = NULL;
192-  int optc;
193-  char const *scontext = NULL;
194-  struct mkdir_options options;
195-
196-  options.make_ancestor_function = NULL;
197-  options.mode = S_IRWXUGO;
198-  options.mode_bits = 0;
199-  options.created_directory_format = NULL;
200-  options.set_security_context = false;
201-
202-  initialize_main (&argc, &argv);
203-  set_program_name (argv[0]);
204-  setlocale (LC_ALL, "");
205-  bindtextdomain (PACKAGE, LOCALEDIR);
206-  textdomain (PACKAGE);
207-
208-  atexit (close_stdout);
209-
210-  while ((optc = getopt_long (argc, argv, "pm:vZ", longopts, NULL)) != -1)
211-    {
212-      switch (optc)
213-        {
214-        case 'p':
215:          options.make_ancestor_function = make_ancestor;




================================================================================

額外一提,上面提到執行「apt-get source coreutils」,會下載四個檔案,

可以執行下面指令,找到下載的網址,也就是多加上一個參數「--print-uris」。


$ apt-get source coreutils --print-uris



顯示


Reading package lists... Done
Need to get 5,294 kB of source archives.
'http://tw.archive.ubuntu.com/ubuntu/pool/main/c/coreutils/coreutils_8.28-1ubuntu1.dsc' coreutils_8.28-1ubuntu1.dsc 2302 SHA256:9a7154fd8a458295b686383767f9305095e6ea929a08c8f56cf51640c3fe209f
'http://tw.archive.ubuntu.com/ubuntu/pool/main/c/coreutils/coreutils_8.28.orig.tar.xz' coreutils_8.28.orig.tar.xz 5252336 SHA256:1117b1a16039ddd84d51a9923948307cfa28c2cea03d1a2438742253df0a0c65
'http://tw.archive.ubuntu.com/ubuntu/pool/main/c/coreutils/coreutils_8.28.orig.tar.xz.asc' coreutils_8.28.orig.tar.xz.asc 1196 SHA256:505b1a530a55732a9ed659d419ff4973d1b15059078d2060675927058db9607d
'http://tw.archive.ubuntu.com/ubuntu/pool/main/c/coreutils/coreutils_8.28-1ubuntu1.debian.tar.xz' coreutils_8.28-1ubuntu1.debian.tar.xz 37940 SHA256:71ba2e83edc675a79e1e0556aff326ab2ae812332692e3db29615e8ed1b427f4



所以也可以手動下載,執行下面指令,


$ wget -c http://tw.archive.ubuntu.com/ubuntu/pool/main/c/coreutils/coreutils_8.28-1ubuntu1.dsc http://tw.archive.ubuntu.com/ubuntu/pool/main/c/coreutils/coreutils_8.28.orig.tar.xz http://tw.archive.ubuntu.com/ubuntu/pool/main/c/coreutils/coreutils_8.28.orig.tar.xz.asc http://tw.archive.ubuntu.com/ubuntu/pool/main/c/coreutils/coreutils_8.28-1ubuntu1.debian.tar.xz



下載完畢後,執行下面指令解開


$ dpkg-source -x coreutils_8.28-1ubuntu1.dsc



一樣會解開到「coreutils-8.28」這個資料夾。

關於這部份的一些相關概念,以前也有寫在幾個討論裡,遣參考「討論一」或是「討論二」或是「討論三」。

一些套件操作的討論案例和參考連結,之前紀錄在「[索引] 套件操作實務」。

關於「apt-get」其他可以加入「--print-uris」這個參數,可以參考「另一篇」紀錄的一些範例。

================================================================================

關於「manpage」的概念,額外一提,

可以執行


$ man -f intro | sort



或是執行


$ whatis intro | sort



顯示


intro (1) - introduction to user commands
intro (2) - introduction to system calls
intro (3) - introduction to library functions
intro (4) - introduction to special files
intro (5) - introduction to file formats and filesystems
intro (6) - introduction to games
intro (7) - introduction to overview and miscellany section
intro (8) - introduction to administration and privileged commands



依據上面的結果,也就是分別可以執行下面指令

$ man 1 intro
$ man 2 intro
$ man 3 intro
$ man 4 intro
$ man 5 intro
$ man 6 intro
$ man 7 intro
$ man 8 intro

更多關於「manpage」的概念,請參考「鳥哥的 Linux 私房菜 / 第四章、首次登入與線上求助 / 4.3.2 man page」。


================================================================================

在我的系統,因為我之前有事先安裝「manpages-posix」,「manpages-posix-dev」,「manpages-dev」這幾個「Package」。

所以執行


$ dpkg -S mkdir | grep man



顯示


manpages-posix-dev: /usr/share/man/man3/mkdir.3posix.gz
coreutils: /usr/share/man/man1/mkdir.1.gz
manpages-dev: /usr/share/man/man2/mkdirat.2.gz
manpages-dev: /usr/share/man/man2/mkdir.2.gz
gvfs-common: /usr/share/man/man1/gvfs-mkdir.1.gz
shtool: /usr/share/man/man1/shtool-mkdir.1.gz
manpages-posix: /usr/share/man/man1/mkdir.1posix.gz



若是尚未安裝上面提到的套件,可以透過「apt-file」來查詢

例如


$ apt-file search mkdir | grep '/man/man*' | grep '/mkdir\.'



顯示


9base: /usr/share/man/man1/mkdir.1plan9.gz
coreutils: /usr/share/man/man1/mkdir.1.gz
freebsd-manpages: /usr/share/man/man2/mkdir.2freebsd.gz
manpages-dev: /usr/share/man/man2/mkdir.2.gz
manpages-posix: /usr/share/man/man1/mkdir.1posix.gz
manpages-posix-dev: /usr/share/man/man3/mkdir.3posix.gz



================================================================================

如同上面提到的「$ man -f intro」或是「$ whatis intro」的概念

也可以套用在「mkdir」上

執行


$ man -f mkdir | sort



或是執行


$ whatis mkdir | sort



顯示


mkdir (1)            - make directories
mkdir (1posix)       - make directories
mkdir (2)            - create a directory
mkdir (3posix)       - make a directory relative to directory file descriptor



================================================================================

執行


$ whereis mkdir



顯示


mkdir: /bin/mkdir /usr/share/man/man2/mkdir.2.gz /usr/share/man/man1/mkdir.1.gz /usr/share/man/man1/mkdir.1posix.gz /usr/share/man/man3/mkdir.3posix.gz



執行


$ which mkdir



顯示


/bin/mkdir



執行


$ dpkg -S /bin/mkdir



顯示


coreutils: /bin/mkdir



表示「/bin/mkdir」是來自於「coreutils」這個「Package」。

上面也可以結合成一行指令來下

執行


dpkg -S $(which mkdir)



或是執行


dpkg -S `which mkdir`



一樣會顯示


coreutils: /bin/mkdir



================================================================================

從「$ man 2 mkdir」和「$ man 3 mkdir」,可以看到「#include <sys/stat.h>

所以執行


$ dpkg -S sys/stat.h



顯示


libc6-dev:amd64: /usr/include/x86_64-linux-gnu/sys/stat.h



可以了解到「/usr/include/x86_64-linux-gnu/sys/stat.h」這個檔案,是來自於「libc6-dev」這個「Package」。

================================================================================

執行下面指令,觀看「Package: libc6-dev」相關資訊。


$ apt-cache show libc6-dev



顯示


Package: libc6-dev
Architecture: amd64
Version: 2.27-3ubuntu1
Multi-Arch: same
Priority: optional
Section: libdevel
Source: glibc
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 18812
Provides: libc-dev
Depends: libc6 (= 2.27-3ubuntu1), libc-dev-bin (= 2.27-3ubuntu1), linux-libc-dev
Suggests: glibc-doc, manpages-dev
Conflicts: libc0.1-dev, libc0.3-dev, libc6.1-dev
Breaks: binutils (<< 2.26), binutils-gold (<< 2.20.1-11), cmake (<< 2.8.4+dfsg.1-5), gcc-4.4 (<< 4.4.6-4), gcc-4.5 (<< 4.5.3-2), gcc-4.6 (<< 4.6.0-12), libhwloc-dev (<< 1.2-3), libjna-java (<< 3.2.7-4), liblouis-dev (<< 2.3.0-2), liblouisxml-dev (<< 2.4.0-2), libperl5.26 (<< 5.26.1-3), make (<< 3.81-8.1), pkg-config (<< 0.26-1)
Filename: pool/main/g/glibc/libc6-dev_2.27-3ubuntu1_amd64.deb
Size: 2586592
MD5sum: 5124b57040a51b04d96e190a36c2c8f1
SHA1: 7b948442903694a1211c96809b8f17ca0be542a0
SHA256: e426c70a940a7d0c5c95823a5fd01f26bd8bcb08d109df2f8c96c439da8dc440
Homepage: https://www.gnu.org/software/libc/libc.html
Description-en: GNU C Library: Development Libraries and Header Files
Contains the symlinks, headers, and object files needed to compile
and link programs which use the standard C library.
Description-md5: 1bbdc717d9acdb44db940928d570e749
Task: lubuntu-gtk-desktop, lubuntu-desktop, lubuntu-qt-desktop, ubuntustudio-graphics
Build-Essential: yes
Supported: 5y



================================================================================

執行下面指令,觀看「Source Package: glibc」相關資訊。


$ apt-cache showsrc libc6-dev



執行下面指令,觀看「Source Package: glibc」相關資訊的前面三行。


$ apt-cache showsrc libc6-dev | grep '^Package:' -A 2



或是執行


$ apt-cache showsrc libc6-dev | grep '^Binary:' -B 2



顯示


Package: glibc
Format: 3.0 (quilt)
Binary: libc-bin, libc-dev-bin, libc-l10n, glibc-doc, glibc-source, locales, locales-all, nscd, multiarch-support, libc6, libc6-dev, libc6-dbg, libc6-pic, libc6-udeb, libc6.1, libc6.1-dev, libc6.1-dbg, libc6.1-pic, libc6.1-udeb, libc0.3, libc0.3-dev, libc0.3-dbg, libc0.3-pic, libc0.3-udeb, libc0.1, libc0.1-dev, libc0.1-dbg, libc0.1-pic, libc0.1-udeb, libc6-i386, libc6-dev-i386, libc6-sparc, libc6-dev-sparc, libc6-sparc64, libc6-dev-sparc64, libc6-s390, libc6-dev-s390, libc6-amd64, libc6-dev-amd64, libc6-powerpc, libc6-dev-powerpc, libc6-ppc64, libc6-dev-ppc64, libc6-mips32, libc6-dev-mips32, libc6-mipsn32, libc6-dev-mipsn32, libc6-mips64, libc6-dev-mips64, libc6-armhf, libc6-dev-armhf, libc6-armel, libc6-dev-armel, libc0.1-i386, libc0.1-dev-i386, libc6-x32, libc6-dev-x32, libc6-xen, libc0.3-xen, libc6.1-alphaev67



================================================================================

執行


$ apt-cache showsrc libc6-dev | grep '^Binary:' | awk -F ': ' '{print $2}' | sed 's/, /\n/g' | sort -u | awk '{printf "* %s\n", $1, $1}'



可以獲得下面列表的「BBCode」。

* glibc-doc
* glibc-source
* libc0.1
* libc0.1-dbg
* libc0.1-dev
* libc0.1-dev-i386
* libc0.1-i386
* libc0.1-pic
* libc0.1-udeb
* libc0.3
* libc0.3-dbg
* libc0.3-dev
* libc0.3-pic
* libc0.3-udeb
* libc0.3-xen
* libc6
* libc6.1
* libc6.1-alphaev67
* libc6.1-dbg
* libc6.1-dev
* libc6.1-pic
* libc6.1-udeb
* libc6-amd64
* libc6-armel
* libc6-armhf
* libc6-dbg
* libc6-dev
* libc6-dev-amd64
* libc6-dev-armel
* libc6-dev-armhf
* libc6-dev-i386
* libc6-dev-mips32
* libc6-dev-mips64
* libc6-dev-mipsn32
* libc6-dev-powerpc
* libc6-dev-ppc64
* libc6-dev-s390
* libc6-dev-sparc
* libc6-dev-sparc64
* libc6-dev-x32
* libc6-i386
* libc6-mips32
* libc6-mips64
* libc6-mipsn32
* libc6-pic
* libc6-powerpc
* libc6-ppc64
* libc6-s390
* libc6-sparc
* libc6-sparc64
* libc6-udeb
* libc6-x32
* libc6-xen
* libc-bin
* libc-dev-bin
* libc-l10n
* locales
* locales-all
* multiarch-support
* nscd

================================================================================

執行


$ apt-cache show glibc-doc | grep '^Depends:'



顯示


Depends: glibc-doc-reference (>= 2.18)



執行下面指令安裝「glibc-doc」這個「Package」


$ sudo apt-get install glibc-doc



================================================================================

執行


$ dpkg -L glibc-doc-reference | grep index



顯示


/usr/share/doc/glibc-doc-reference/html/index.html



執行下面指令,觀看「/usr/share/doc/glibc-doc-reference/html/index.html


$ firefox /usr/share/doc/glibc-doc-reference/html/index.html



或是執行


$ lynx /usr/share/doc/glibc-doc-reference/html/index.html



或是執行


$ w3m /usr/share/doc/glibc-doc-reference/html/index.html



================================================================================

執行


$ dpkg -L glibc-doc-reference | grep file -i



顯示


/usr/share/doc/glibc-doc-reference/html/Copying-File-Data.html
/usr/share/doc/glibc-doc-reference/html/Deleting-Files.html
/usr/share/doc/glibc-doc-reference/html/Executing-a-File.html
/usr/share/doc/glibc-doc-reference/html/FIFO-Special-Files.html
/usr/share/doc/glibc-doc-reference/html/File-Attributes.html
/usr/share/doc/glibc-doc-reference/html/File-Index.html
/usr/share/doc/glibc-doc-reference/html/File-Locks.html
/usr/share/doc/glibc-doc-reference/html/File-Minimums.html
/usr/share/doc/glibc-doc-reference/html/File-Name-Errors.html
/usr/share/doc/glibc-doc-reference/html/File-Name-Portability.html
/usr/share/doc/glibc-doc-reference/html/File-Name-Resolution.html
/usr/share/doc/glibc-doc-reference/html/File-Names.html
/usr/share/doc/glibc-doc-reference/html/File-Owner.html
/usr/share/doc/glibc-doc-reference/html/File-Position-Primitive.html
/usr/share/doc/glibc-doc-reference/html/File-Position.html
/usr/share/doc/glibc-doc-reference/html/File-Positioning.html
/usr/share/doc/glibc-doc-reference/html/File-Size.html
/usr/share/doc/glibc-doc-reference/html/File-Status-Flags.html
/usr/share/doc/glibc-doc-reference/html/File-System-Interface.html
/usr/share/doc/glibc-doc-reference/html/File-Times.html
/usr/share/doc/glibc-doc-reference/html/Filesystem-Handling.html
/usr/share/doc/glibc-doc-reference/html/Getting-File-Status-Flags.html
/usr/share/doc/glibc-doc-reference/html/Header-Files.html
/usr/share/doc/glibc-doc-reference/html/Limits-for-Files.html
/usr/share/doc/glibc-doc-reference/html/Making-Special-Files.html
/usr/share/doc/glibc-doc-reference/html/NSS-Configuration-File.html
/usr/share/doc/glibc-doc-reference/html/Notes-on-NSS-Configuration-File.html
/usr/share/doc/glibc-doc-reference/html/Open-File-Description-Locks-Example.html
/usr/share/doc/glibc-doc-reference/html/Open-File-Description-Locks.html
/usr/share/doc/glibc-doc-reference/html/Opening-and-Closing-Files.html
/usr/share/doc/glibc-doc-reference/html/Options-for-Files.html
/usr/share/doc/glibc-doc-reference/html/Renaming-Files.html
/usr/share/doc/glibc-doc-reference/html/Streams-and-File-Descriptors.html
/usr/share/doc/glibc-doc-reference/html/Temporary-Files.html
/usr/share/doc/glibc-doc-reference/html/Testing-File-Access.html
/usr/share/doc/glibc-doc-reference/html/Testing-File-Type.html
/usr/share/doc/glibc-doc-reference/html/The-message-catalog-files.html



執行下面指令,觀看「/usr/share/doc/glibc-doc-reference/html/File-System-Interface.html


$ firefox /usr/share/doc/glibc-doc-reference/html/File-System-Interface.html



或是執行


$ lynx /usr/share/doc/glibc-doc-reference/html/File-System-Interface.html



或是執行


$ w3m /usr/share/doc/glibc-doc-reference/html/File-System-Interface.html



================================================================================

執行


$ dpkg -L glibc-doc-reference | grep dir -i



顯示


/usr/share/doc/glibc-doc-reference/html/Accessing-Directories.html
/usr/share/doc/glibc-doc-reference/html/Creating-Directories.html
/usr/share/doc/glibc-doc-reference/html/Directories.html
/usr/share/doc/glibc-doc-reference/html/Directory-Entries.html
/usr/share/doc/glibc-doc-reference/html/Opening-a-Directory.html
/usr/share/doc/glibc-doc-reference/html/Random-Access-Directory.html
/usr/share/doc/glibc-doc-reference/html/Reading_002fClosing-Directory.html
/usr/share/doc/glibc-doc-reference/html/Scanning-Directory-Content.html
/usr/share/doc/glibc-doc-reference/html/Simple-Directory-Lister-Mark-II.html
/usr/share/doc/glibc-doc-reference/html/Simple-Directory-Lister.html
/usr/share/doc/glibc-doc-reference/html/Working-Directory.html
/usr/share/doc/glibc-doc-reference/html/Working-with-Directory-Trees.html



執行下面指令,觀看「/usr/share/doc/glibc-doc-reference/html/Creating-Directories.html


$ firefox /usr/share/doc/glibc-doc-reference/html/Creating-Directories.html



或是執行


$ lynx /usr/share/doc/glibc-doc-reference/html/Creating-Directories.html



或是執行


$ w3m /usr/share/doc/glibc-doc-reference/html/Creating-Directories.html



================================================================================

執行


$ dpkg -L glibc-doc-reference | grep info



顯示


/usr/share/info
/usr/share/info/libc.info-1.gz
/usr/share/info/libc.info-10.gz
/usr/share/info/libc.info-11.gz
/usr/share/info/libc.info-12.gz
/usr/share/info/libc.info-13.gz
/usr/share/info/libc.info-2.gz
/usr/share/info/libc.info-3.gz
/usr/share/info/libc.info-4.gz
/usr/share/info/libc.info-5.gz
/usr/share/info/libc.info-6.gz
/usr/share/info/libc.info-7.gz
/usr/share/info/libc.info-8.gz
/usr/share/info/libc.info-9.gz
/usr/share/info/libc.info.gz



執行


$ info libc



執行


$ info libc -n 'File System Interface'



執行


$ info libc -n 'Creating Directories'



================================================================================

apt-cache showsrc glibc-doc | grep '^Homepage:'

執行


$ apt-cache show glibc-doc | grep '^Homepage:'



或是執行


$ apt-cache showsrc glibc-doc | grep '^Homepage:'



或是執行


$ apt-cache show libc6-dev | grep '^Homepage:'



或是執行


$ apt-cache showsrc libc6-dev | grep '^Homepage:'



或是執行


$ apt-cache showsrc glibc | grep '^Homepage:'



顯示


Homepage: https://www.gnu.org/software/libc/libc.html


從「https://www.gnu.org/software/libc/libc.html」這個頁面,就可以陸續找到下面的網址

* https://www.gnu.org/software/libc/libc.html
* https://www.gnu.org/software/libc/documentation.html
* https://www.gnu.org/software/libc/manual/
* https://www.gnu.org/software/libc/manual/html_mono/libc.html
* https://www.gnu.org/software/libc/manual/html_node/index.html (/usr/share/doc/glibc-doc-reference/html/index.html)
* https://www.gnu.org/software/libc/manual/html_node/File-System-Interface.html (/usr/share/doc/glibc-doc-reference/html/File-System-Interface.html)
* https://www.gnu.org/software/libc/manual/html_node/Creating-Directories.html (/usr/share/doc/glibc-doc-reference/html/Creating-Directories.html)

================================================================================

以上提供參考,報告完畢。


11/14 13:35:46
應用擴展 工具箱


 [無發表權] 請登錄或者註冊


可以查看帖子.
不可發帖.
不可回覆.
不可編輯自己的帖子.
不可刪除自己的帖子.
不可發起投票調查.
不可在投票調查中投票.
不可上傳附件.
不可不經審核直接發帖.