我发出了以下命令:
sudo cp ~/Transfers/ZendFramework-1.11.4-minimal/library/Zend/* ~/public_html/cmsk.dev/library/
Run Code Online (Sandbox Code Playgroud)
当我这样做时,我开始收到以下消息:
cp: omitting directory `Tag'
cp: omitting directory `Test'
cp: omitting directory `Text'
cp: omitting directory `TimeSync'
cp: omitting directory `Tool'
cp: omitting directory `Translate'
cp: omitting directory `Uri'
cp: omitting directory `Validate'
Run Code Online (Sandbox Code Playgroud)
等等...
为什么我会收到这些消息?
如果我想创建多个目录(在同一级别),然后为它提供一个逗号分隔的目录名称列表(或类似的东西)?
我一直试图找到在终端中使用dir和ls命令之间的区别。我知道ls是查看目录中文件的传统 UNIX 方法,这dir与 Windows 命令提示符等效,但是这两个命令都可以在终端中使用。
如果我输入dir,它会显示目录中的文件和文件夹,如果我输入ls,它会做同样的事情,除了突出显示内容。这两个命令都接受选项(即ls -a,dir -a都返回所有文件和文件夹以及隐藏文件。
那么有谁知道有什么区别以及为什么都使用dir和ls?
我试过了which cd,但它没有给出路径,而是返回了退出代码 1(用 进行了检查echo $?)。coreutilcd本身正在工作,所以可执行文件应该在那里,对吗?我也运行了findfor cd,但没有显示可执行文件。那它是如何实施的呢?
更新:
我不知道我是否应该在另一篇文章中问这个问题,但因为我认为这里很好,我正在扩展(?)这篇文章......所以答案实际上很简单,没有可执行文件 - 因为它是内置程序 — 但我发现一些内置程序(Fedora 中的 bash shell)具有可执行文件!所以内置 -> 我想没有可执行文件是不对的?也许一个解释什么是内置函数的答案(内置命令?),这实际上是这里的问题,而不是更多地关注cd......之前发布的一些好的链接表明内置函数不是程序......那么它们是什么?它们是如何工作的?它们只是外壳的函数或线程吗?
有人可以帮助我理解为什么添加任何小写字母 (az) 如下所示会对 date -d 输出产生影响,以及该命令中的这些字母是什么意思?
\nwip$ date -d "12:24 a"\nMon Apr 18 18:54:00 IST 2022\nwip$ date -d "12:24 b"\nMon Apr 18 19:54:00 IST 2022\nwip$ date -d "12:24 c"\nMon Apr 18 20:54:00 IST 2022\nwip$ date -d "12:24 d"\nMon Apr 18 21:54:00 IST 2022\nwip$ date -d "12:24 e"\nMon Apr 18 22:54:00 IST 2022\nwip$ date -d "12:24 f"\nMon Apr 18 23:54:00 IST 2022\nwip$ date -d "12:24 g"\nTue Apr 19 00:54:00 IST 2022\nwip$ date -d "12:24 h"\nTue Apr 19 01:54:00 IST 2022\nwip$ …Run Code Online (Sandbox Code Playgroud) Ubuntu 有 lint 实用程序吗?它是如何安装的?
在计算机编程中,lint 是一种 Unix 实用程序。
https://en.wikipedia.org/wiki/Lint_%28software%29
thufir@mordor:~$
thufir@mordor:~$ gcc program.c -o prog
program.c:5:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main()
^
thufir@mordor:~$
thufir@mordor:~$ ./prog
Hello World
thufir@mordor:~$
thufir@mordor:~$ lint program.c
No command 'lint' found, did you mean:
Command 'line' from package 'util-linux' (main)
Command 'jlint' from package 'jlint' (universe)
Command 'link' from package 'coreutils' (main)
Command 'dlint' from package 'dlint' (universe)
Command 'lift' from package 'lift' (universe)
Command 'tint' from package 'tint' (universe)
Command 'hlint' from …Run Code Online (Sandbox Code Playgroud) 我经常在 bash 中键入这些命令:
mkdir something
cd something
Run Code Online (Sandbox Code Playgroud)
我几乎从不这样做:
mkdir something
ls # something in the current directory, not ./something/
Run Code Online (Sandbox Code Playgroud)
从来没有这个:
mkdir something something2
Run Code Online (Sandbox Code Playgroud)
我怎样才能mkdir cd进入新创建的目录?我的意思是,如果 I mkdir something,则命令cd something在之后立即执行。
例子:
$ pwd
/home/me
$ mkdir something
$ pwd
/home/me/something
Run Code Online (Sandbox Code Playgroud) 如果日期代码表示任何一年 3 月最后一个星期日的 2:00:00AM 到 2:59:59AM,touch -t 会给我“无效的日期格式”错误(我已经检查过 2023,2014,2016,2018 )。核心实用程序中这种奇怪的现象让我大吃一惊。这是一些已知的错误吗?有解决方法吗?
\n例子:
\n$ touch -t 201603270159.59 myfile.txt #1:59AM works\n$ touch -t 202303260200.00 myfile.txt #2:00AM fails\ntouch: invalid date format \xe2\x80\x98202303260200.00\xe2\x80\x99\n$ touch -t 201603270259.59 myfile.txt #2:59AM fails\ntouch: invalid date format \xe2\x80\x98201603270259.59\xe2\x80\x99\n$ touch -t 201603270300.00 myfile.txt #3:00AM works\n$ touch -t 202303270200.00 myfile.txt #2:00AM the next day works\nRun Code Online (Sandbox Code Playgroud)\n(这些内容为 YYYYMMDDHHMM.SS)。
\n我接触了 5000 个文件的集合,这些文件的时间戳可追溯到 12 年前。这是触摸失败的日期时间戳列表。问题日期始终是三月的最后一个星期日
\ntouch -t 201403300248.57 fileA.txt\ntouch -t 201403300251.21 fileB.txt\ntouch -t 201403300253.03 fileC.txt\ntouch -t 201603270252.42 fileD.txt\ntouch -t 201603270234.43 …Run Code Online (Sandbox Code Playgroud) coreutils ×10
command-line ×9
directory ×3
date ×2
mkdir ×2
bash ×1
c ×1
cd-command ×1
cp ×1
ls ×1
programming ×1
tee ×1
time ×1