当前位置: 首页 > news >正文

Linux 终端命令之文件目录操作,对比Dos相关命令

目录

前言

基础命令(文件目录相关的)

cd命令

【英文帮助】

【对应Dos命令】

pwd命令

【英文帮助】

【对应Dos命令】

ls命令

【英文帮助】

【对应Dos命令】

tree命令

【英文帮助】

【对应Dos命令】

mkdir命令

【英文帮助】

【对应Dos命令】

rmdir/rm命令

【英文帮助】

【对应Dos命令】

cp命令

【英文帮助】

【对应Dos命令】

touch命令

【英文帮助】

【对应Dos命令】

mv命令

【英文帮助】

【对应Dos命令】

chmod命令

【英文帮助】

【对应Dos命令】

总结


前言

Linux是一个开源的操作系统,它的目录结构非常重要,因为它是使用Linux系统的一个基础。本文将介绍一些操作Linux系统中文件、目录的常用命令,其中有些命令在Dos中也有命令相对应(指发挥的功能类似的)。

另外有一点区别: Linux系统下命令是大小写敏感的,一般是全小写的;Dos系统下命令是不区分大小写的,命令名大小写混装都是相同的,如 cd CD cD Cd就是同一个命令。

基础命令(文件目录相关的)

cd命令

cd:切换当前工作目录。可以使用绝对路径或相对路径。

进入根目录的命令是:cd /,进入用户的home目录的命令是:cd ~。
其中,“/”、“~” 分别表示根目录和当前用户的home目录。

绝对路径方式的切换:cd /home/user/documents
相对路径方式的切换:cd ../user/documents
其中,绝对路径指从根目录起始的路径;相对路径指从当前目录起始的路径。

【英文帮助】

hann@HannYang:~$ cd --help
cd: cd [-L|[-P [-e]] [-@]] [dir]Change the shell working directory.Change the current directory to DIR.  The default DIR is the value of theHOME shell variable.The variable CDPATH defines the search path for the directory containingDIR.  Alternative directory names in CDPATH are separated by a colon (:).A null directory name is the same as the current directory.  If DIR beginswith a slash (/), then CDPATH is not used.If the directory is not found, and the shell option `cdable_vars' is set,the word is assumed to be  a variable name.  If that variable has a value,its value is used for DIR.Options:-L        force symbolic links to be followed: resolve symboliclinks in DIR after processing instances of `..'-P        use the physical directory structure without followingsymbolic links: resolve symbolic links in DIR beforeprocessing instances of `..'-e        if the -P option is supplied, and the current workingdirectory cannot be determined successfully, exit witha non-zero status-@        on systems that support it, present a file with extendedattributes as a directory containing the file attributesThe default is to follow symbolic links, as if `-L' were specified.`..' is processed by removing the immediately previous pathname componentback to a slash or the beginning of DIR.Exit Status:Returns 0 if the directory is changed, and if $PWD is set successfully when-P is used; non-zero otherwise.

【对应Dos命令】

cd 同名同功能,格式: cd 目录路径

显示当前目录名或改变当前目录。或者用长名称 chdir

CHDIR [/D] [drive:][path]
CHDIR [..]
CD [/D] [drive:][path]
CD [..]

  ..   指定要改成父目录。

键入 CD drive: 显示指定驱动器中的当前目录。
不带参数只键入 CD,则显示当前驱动器和目录。

使用 /D 开关,除了改变驱动器的当前目录之外,
还可改变当前驱动器。

如果命令扩展被启用,CHDIR 会如下改变:

当前的目录字符串会被转换成使用磁盘名上的大小写。所以,
如果磁盘上的大小写如此,CD C:\TEMP 会将当前目录设为
C:\Temp。

CHDIR 命令不把空格当作分隔符,因此有可能将目录名改为一个
带有空格但不带有引号的子目录名。例如:

     cd \winnt\profiles\username\programs\start menu

与下列相同:

     cd "\winnt\profiles\username\programs\start menu"

在扩展停用的情况下,你必须键入以上命令。


pwd命令

pwd:显示当前工作目录的路径。例如,pwd将显示当前工作目录的完整路径。

pwd命令用于显示当前工作目录(即当前所在的目录)的绝对路径。在Linux系统中,每个用户都有自己的home目录,刚登陆系统时,所在的目录就是用户自己的home目录。

hann@HannYang:~$ pwd
/home/hann

【英文帮助】

hann@HannYang:~$ pwd --help
pwd: pwd [-LP]Print the name of the current working directory.Options:-L        print the value of $PWD if it names the current workingdirectory-P        print the physical directory, without any symbolic linksBy default, `pwd' behaves as if `-L' were specified.Exit Status:Returns 0 unless an invalid option is given or the current directorycannot be read.

【对应Dos命令】

Dos下没有单独的pwd命令,用CD命令不加参数即可:

C:\Users\hann>CD
C:\Users\hann

C:\Users\hann>cD
C:\Users\hann

C:\Users\hann>Cd
C:\Users\hann

C:\Users\hann>cd
C:\Users\hann


ls命令

ls:显示当前或指定目录中的文件和目录列表。

ls 命令参数极其复杂,默认为短格式显示,只有文件名,详细格式可以用参数 -l ,以长格式详细显示目录中的文件和目录列表,包括文件大小、权限、所有者、修改时间等信息。

【英文帮助】

hann@HannYang:~$ ls --help
Usage: ls [OPTION]... [FILE]...
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.Mandatory arguments to long options are mandatory for short options too.-a, --all                  do not ignore entries starting with .-A, --almost-all           do not list implied . and ..--author               with -l, print the author of each file-b, --escape               print C-style escapes for nongraphic characters--block-size=SIZE      with -l, scale sizes by SIZE when printing them;e.g., '--block-size=M'; see SIZE format below-B, --ignore-backups       do not list implied entries ending with ~-c                         with -lt: sort by, and show, ctime (time of lastmodification of file status information);with -l: show ctime and sort by name;otherwise: sort by ctime, newest first-C                         list entries by columns--color[=WHEN]         colorize the output; WHEN can be 'always' (defaultif omitted), 'auto', or 'never'; more info below-d, --directory            list directories themselves, not their contents-D, --dired                generate output designed for Emacs' dired mode-f                         do not sort, enable -aU, disable -ls --color-F, --classify             append indicator (one of */=>@|) to entries--file-type            likewise, except do not append '*'--format=WORD          across -x, commas -m, horizontal -x, long -l,single-column -1, verbose -l, vertical -C--full-time            like -l --time-style=full-iso-g                         like -l, but do not list owner--group-directories-firstgroup directories before files;can be augmented with a --sort option, but anyuse of --sort=none (-U) disables grouping-G, --no-group             in a long listing, don't print group names-h, --human-readable       with -l and -s, print sizes like 1K 234M 2G etc.--si                   likewise, but use powers of 1000 not 1024-H, --dereference-command-linefollow symbolic links listed on the command line--dereference-command-line-symlink-to-dirfollow each command line symbolic linkthat points to a directory--hide=PATTERN         do not list implied entries matching shell PATTERN(overridden by -a or -A)--hyperlink[=WHEN]     hyperlink file names; WHEN can be 'always'(default if omitted), 'auto', or 'never'--indicator-style=WORD  append indicator with style WORD to entry names:none (default), slash (-p),file-type (--file-type), classify (-F)-i, --inode                print the index number of each file-I, --ignore=PATTERN       do not list implied entries matching shell PATTERN-k, --kibibytes            default to 1024-byte blocks for disk usage;used only with -s and per directory totals-l                         use a long listing format-L, --dereference          when showing file information for a symboliclink, show information for the file the linkreferences rather than for the link itself-m                         fill width with a comma separated list of entries-n, --numeric-uid-gid      like -l, but list numeric user and group IDs-N, --literal              print entry names without quoting-o                         like -l, but do not list group information-p, --indicator-style=slashappend / indicator to directories-q, --hide-control-chars   print ? instead of nongraphic characters--show-control-chars   show nongraphic characters as-is (the default,unless program is 'ls' and output is a terminal)-Q, --quote-name           enclose entry names in double quotes--quoting-style=WORD   use quoting style WORD for entry names:literal, locale, shell, shell-always,shell-escape, shell-escape-always, c, escape(overrides QUOTING_STYLE environment variable)-r, --reverse              reverse order while sorting-R, --recursive            list subdirectories recursively-s, --size                 print the allocated size of each file, in blocks-S                         sort by file size, largest first--sort=WORD            sort by WORD instead of name: none (-U), size (-S),time (-t), version (-v), extension (-X)--time=WORD            with -l, show time as WORD instead of defaultmodification time: atime or access or use (-u);ctime or status (-c); also use specified timeas sort key if --sort=time (newest first)--time-style=TIME_STYLE  time/date format with -l; see TIME_STYLE below-t                         sort by modification time, newest first-T, --tabsize=COLS         assume tab stops at each COLS instead of 8-u                         with -lt: sort by, and show, access time;with -l: show access time and sort by name;otherwise: sort by access time, newest first-U                         do not sort; list entries in directory order-v                         natural sort of (version) numbers within text-w, --width=COLS           set output width to COLS.  0 means no limit-x                         list entries by lines instead of by columns-X                         sort alphabetically by entry extension-Z, --context              print any security context of each file-1                         list one file per line.  Avoid '\n' with -q or -b--help     display this help and exit--version  output version information and exitThe SIZE argument is an integer and optional unit (example: 10K is 10*1024).
Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).The TIME_STYLE argument can be full-iso, long-iso, iso, locale, or +FORMAT.
FORMAT is interpreted like in date(1).  If FORMAT is FORMAT1<newline>FORMAT2,
then FORMAT1 applies to non-recent files and FORMAT2 to recent files.
TIME_STYLE prefixed with 'posix-' takes effect only outside the POSIX locale.
Also the TIME_STYLE environment variable sets the default style to use.Using color to distinguish file types is disabled both by default and
with --color=never.  With --color=auto, ls emits color codes only when
standard output is connected to a terminal.  The LS_COLORS environment
variable can change the settings.  Use the dircolors command to set it.Exit status:0  if OK,1  if minor problems (e.g., cannot access subdirectory),2  if serious trouble (e.g., cannot access command-line argument).GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report ls translation bugs to <https://translationproject.org/team/>
Full documentation at: <https://www.gnu.org/software/coreutils/ls>
or available locally via: info '(coreutils) ls invocation'

【对应Dos命令】

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
  [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

  [drive:][path][filename]
              指定要列出的驱动器、目录和/或文件。

  /A          显示具有指定属性的文件。
  属性         D  目录                R  只读文件
               H  隐藏文件            A  准备存档的文件
               S  系统文件            I  无内容索引文件
               L  重新分析点          O  脱机文件
               -  表示“否”的前缀
  /B          使用空格式(没有标题信息或摘要)。
  /C          在文件大小中显示千位数分隔符。这是默认值。用 /-C 来
              禁用分隔符显示。
  /D          跟宽式相同,但文件是按栏分类列出的。
  /L          用小写。
  /N          新的长列表格式,其中文件名在最右边。
  /O          用分类顺序列出文件。
  排列顺序     N  按名称(字母顺序)     S  按大小(从小到大)
               E  按扩展名(字母顺序)   D  按日期/时间(从先到后)
               G  组目录优先           -  反转顺序的前缀
  /P          在每个信息屏幕后暂停。
  /Q          显示文件所有者。
  /R          显示文件的备用数据流。
  /S          显示指定目录和所有子目录中的文件。
  /T          控制显示或用来分类的时间字符域
  时间段      C  创建时间
              A  上次访问时间
              W  上次写入的时间
  /W          用宽列表格式。
  /X          显示为非 8dot3 文件名产生的短名称。格式是 /N 的格式,
              短名称插在长名称前面。如果没有短名称,在其位置则
              显示空白。
  /4          以四位数字显示年份

可以在 DIRCMD 环境变量中预先设定开关。通过添加前缀 - (破折号)
来替代预先设定的开关。例如,/-W。


tree命令

tree:以树形结构显示当前目录中的文件和目录列表。

【英文帮助】

hann@HannYang:~$ tree --help
usage: tree [-acdfghilnpqrstuvxACDFJQNSUX] [-H baseHREF] [-T title ][-L level [-R]] [-P pattern] [-I pattern] [-o filename] [--version][--help] [--inodes] [--device] [--noreport] [--nolinks] [--dirsfirst][--charset charset] [--filelimit[=]#] [--si] [--timefmt[=]<f>][--sort[=]<name>] [--matchdirs] [--ignore-case] [--fromfile] [--][<directory list>]------- Listing options --------a            All files are listed.-d            List directories only.-l            Follow symbolic links like directories.-f            Print the full path prefix for each file.-x            Stay on current filesystem only.-L level      Descend only level directories deep.-R            Rerun tree when max dir level reached.-P pattern    List only those files that match the pattern given.-I pattern    Do not list files that match the given pattern.--ignore-case Ignore case when pattern matching.--matchdirs   Include directory names in -P pattern matching.--noreport    Turn off file/directory count at end of tree listing.--charset X   Use charset X for terminal/HTML and indentation line output.--filelimit # Do not descend dirs with more than # files in them.--timefmt <f> Print and format time according to the format <f>.-o filename   Output to file instead of stdout.------- File options --------q            Print non-printable characters as '?'.-N            Print non-printable characters as is.-Q            Quote filenames with double quotes.-p            Print the protections for each file.-u            Displays file owner or UID number.-g            Displays file group owner or GID number.-s            Print the size in bytes of each file.-h            Print the size in a more human readable way.--si          Like -h, but use in SI units (powers of 1000).-D            Print the date of last modification or (-c) status change.-F            Appends '/', '=', '*', '@', '|' or '>' as per ls -F.--inodes      Print inode number of each file.--device      Print device ID number to which each file belongs.------- Sorting options --------v            Sort files alphanumerically by version.-t            Sort files by last modification time.-c            Sort files by last status change time.-U            Leave files unsorted.-r            Reverse the order of the sort.--dirsfirst   List directories before files (-U disables).--sort X      Select sort: name,version,size,mtime,ctime.------- Graphics options --------i            Don't print indentation lines.-A            Print ANSI lines graphic indentation lines.-S            Print with CP437 (console) graphics indentation lines.-n            Turn colorization off always (-C overrides).-C            Turn colorization on always.------- XML/HTML/JSON options --------X            Prints out an XML representation of the tree.-J            Prints out an JSON representation of the tree.-H baseHREF   Prints out HTML format with baseHREF as top directory.-T string     Replace the default HTML title and H1 header with string.--nolinks     Turn off hyperlinks in HTML output.------- Input options ---------fromfile    Reads paths from files (.=stdin)------- Miscellaneous options ---------version     Print version and exit.--help        Print usage and this help message and exit.--            Options processing terminator.

【对应Dos命令】

同名类似功能 tree,linux的tree参数更丰富

以图形显示驱动器或路径的文件夹结构。

TREE [drive:][path] [/F] [/A]

   /F   显示每个文件夹中文件的名称。
   /A   使用 ASCII 字符,而不使用扩展字符。


mkdir命令

mkdir:创建一个新的目录。例如:
mkdir new_directory将创建一个名为new_directory的新目录。

【英文帮助】

hann@HannYang:~$ cd --help
cd: cd [-L|[-P [-e]] [-@]] [dir]Change the shell working directory.Change the current directory to DIR.  The default DIR is the value of theHOME shell variable.The variable CDPATH defines the search path for the directory containingDIR.  Alternative directory names in CDPATH are separated by a colon (:).A null directory name is the same as the current directory.  If DIR beginswith a slash (/), then CDPATH is not used.If the directory is not found, and the shell option `cdable_vars' is set,the word is assumed to be  a variable name.  If that variable has a value,its value is used for DIR.Options:-L        force symbolic links to be followed: resolve symboliclinks in DIR after processing instances of `..'-P        use the physical directory structure without followingsymbolic links: resolve symbolic links in DIR beforeprocessing instances of `..'-e        if the -P option is supplied, and the current workingdirectory cannot be determined successfully, exit witha non-zero status-@        on systems that support it, present a file with extendedattributes as a directory containing the file attributesThe default is to follow symbolic links, as if `-L' were specified.`..' is processed by removing the immediately previous pathname componentback to a slash or the beginning of DIR.Exit Status:Returns 0 if the directory is changed, and if $PWD is set successfully when-P is used; non-zero otherwise.

【对应Dos命令】

mkdir 同名同功能,或者用短名称 md。

创建目录。

MKDIR [drive:]path
MD [drive:]path

如果命令扩展被启用,MKDIR 会如下改变:

如果需要,MKDIR 会在路径中创建中级目录。例如: 假设 \a 不
存在,那么:

    mkdir \a\b\c\d

与:

    mkdir \a
    chdir \a
    mkdir b
    chdir b
    mkdir c
    chdir c
    mkdir d

相同。如果扩展被停用,则需要键入 mkdir \a\b\c\d。


rmdir/rm命令

rmdir:删除一个空目录。例如:
rmdir empty_directory将删除名为empty_directory的空目录。

rm:用于删除文件或目录。如果我们想删除一个目录及其所有子文件和子目录,可以使用rm命令加上-r参数,例如:rm -r example。

【英文帮助】

hann@HannYang:~$ rmdir --help
Usage: rmdir [OPTION]... DIRECTORY...
Remove the DIRECTORY(ies), if they are empty.--ignore-fail-on-non-emptyignore each failure that is solely because a directoryis non-empty-p, --parents   remove DIRECTORY and its ancestors; e.g., 'rmdir -p a/b/c' issimilar to 'rmdir a/b/c a/b a'-v, --verbose   output a diagnostic for every directory processed--help     display this help and exit--version  output version information and exitGNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report rmdir translation bugs to <https://translationproject.org/team/>
Full documentation at: <https://www.gnu.org/software/coreutils/rmdir>
or available locally via: info '(coreutils) rmdir invocation'
hann@HannYang:~$ rm --help
Usage: rm [OPTION]... [FILE]...
Remove (unlink) the FILE(s).-f, --force           ignore nonexistent files and arguments, never prompt-i                    prompt before every removal-I                    prompt once before removing more than three files, orwhen removing recursively; less intrusive than -i,while still giving protection against most mistakes--interactive[=WHEN]  prompt according to WHEN: never, once (-I), oralways (-i); without WHEN, prompt always--one-file-system  when removing a hierarchy recursively, skip anydirectory that is on a file system different fromthat of the corresponding command line argument--no-preserve-root  do not treat '/' specially--preserve-root[=all]  do not remove '/' (default);with 'all', reject any command line argumenton a separate device from its parent-r, -R, --recursive   remove directories and their contents recursively-d, --dir             remove empty directories-v, --verbose         explain what is being done--help     display this help and exit--version  output version information and exitBy default, rm does not remove directories.  Use the --recursive (-r or -R)
option to remove each listed directory, too, along with all of its contents.To remove a file whose name starts with a '-', for example '-foo',
use one of these commands:rm -- -foorm ./-fooNote that if you use rm to remove a file, it might be possible to recover
some of its contents, given sufficient expertise and/or time.  For greater
assurance that the contents are truly unrecoverable, consider using shred.GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report rm translation bugs to <https://translationproject.org/team/>
Full documentation at: <https://www.gnu.org/software/coreutils/rm>
or available locally via: info '(coreutils) rm invocation'

【对应Dos命令】

Dos下rmdir和rd是同一个命令,linux下rmdir和rm是两个不同的命令。

删除一个目录。

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

    /S      除目录本身外,还将删除指定目录下的所有子目录和
            文件。用于删除目录树。

    /Q      安静模式,带 /S 删除目录树时不要求确认


cp命令

cp:复制一个文件或目录。

cp:复制文件或目录。例如,cp file1 file2将复制file1file2。要复制目录及其内容,需要使用-r选项,如cp -r dir1 dir2

cp命令用于复制文件或目录。例如,我们可以使用cp命令将一个名为“example”的目录复制到当前目录中,命令是:cp -r example .

【英文帮助】

hann@HannYang:~$ cd --help
cd: cd [-L|[-P [-e]] [-@]] [dir]Change the shell working directory.Change the current directory to DIR.  The default DIR is the value of theHOME shell variable.The variable CDPATH defines the search path for the directory containingDIR.  Alternative directory names in CDPATH are separated by a colon (:).A null directory name is the same as the current directory.  If DIR beginswith a slash (/), then CDPATH is not used.If the directory is not found, and the shell option `cdable_vars' is set,the word is assumed to be  a variable name.  If that variable has a value,its value is used for DIR.Options:-L        force symbolic links to be followed: resolve symboliclinks in DIR after processing instances of `..'-P        use the physical directory structure without followingsymbolic links: resolve symbolic links in DIR beforeprocessing instances of `..'-e        if the -P option is supplied, and the current workingdirectory cannot be determined successfully, exit witha non-zero status-@        on systems that support it, present a file with extendedattributes as a directory containing the file attributesThe default is to follow symbolic links, as if `-L' were specified.`..' is processed by removing the immediately previous pathname componentback to a slash or the beginning of DIR.Exit Status:Returns 0 if the directory is changed, and if $PWD is set successfully when-P is used; non-zero otherwise.

【对应Dos命令】

copy 主要功能相同,linux中简称为cp。

将一份或多份文件复制到另一个位置。

COPY [/D] [/V] [/N] [/Y | /-Y] [/Z] [/L] [/A | /B ] source [/A | /B]
     [+ source [/A | /B] [+ ...]] [destination [/A | /B]]

  source       指定要复制的文件。
  /A           表示一个 ASCII 文本文件。
  /B           表示一个二进位文件。
  /D           允许解密要创建的目标文件
  destination  为新文件指定目录和/或文件名。
  /V           验证新文件写入是否正确。
  /N           复制带有非 8dot3 名称的文件时,
               尽可能使用短文件名。
  /Y           不使用确认是否要覆盖现有目标文件
               的提示。
  /-Y          使用确认是否要覆盖现有目标文件
               的提示。
  /Z           用可重新启动模式复制已联网的文件。
/L           如果源是符号链接,请将链接复制
               到目标而不是源链接指向的实际文件。

命令行开关 /Y 可以在 COPYCMD 环境变量中预先设定。
这可能会被命令行上的 /-Y 替代。除非 COPY
命令是在一个批处理脚本中执行的,默认值应为
在覆盖时进行提示。

要附加文件,请为目标指定一个文件,为源指定
数个文件(用通配符或 file1+file2+file3 格式)。


touch命令

touch:创建一个新的空文件或更新现有文件的访问和修改时间。例如,
touch file1将创建一个名为file1的新文件,或touch file1将更新file1的访问和修改时间。

【英文帮助】

hann@HannYang:~$ touch --help
Usage: touch [OPTION]... FILE...
Update the access and modification times of each FILE to the current time.A FILE argument that does not exist is created empty, unless -c or -h
is supplied.A FILE argument string of - is handled specially and causes touch to
change the times of the file associated with standard output.Mandatory arguments to long options are mandatory for short options too.-a                     change only the access time-c, --no-create        do not create any files-d, --date=STRING      parse STRING and use it instead of current time-f                     (ignored)-h, --no-dereference   affect each symbolic link instead of any referencedfile (useful only on systems that can change thetimestamps of a symlink)-m                     change only the modification time-r, --reference=FILE   use this file's times instead of current time-t STAMP               use [[CC]YY]MMDDhhmm[.ss] instead of current time--time=WORD        change the specified time:WORD is access, atime, or use: equivalent to -aWORD is modify or mtime: equivalent to -m--help     display this help and exit--version  output version information and exitNote that the -d and -t options accept different time-date formats.GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report touch translation bugs to <https://translationproject.org/team/>
Full documentation at: <https://www.gnu.org/software/coreutils/touch>
or available locally via: info '(coreutils) touch invocation'

【对应Dos命令】

没有同名对应的,可以用copy命令实现创建新的空文件

copy con newfile.txt  需要手输 ctrl+Z 加 回车。

另外可用 echo. > newfile.txt,这个命令一步到位。
注意echo后有句符号中间不能有空格,有空格就把点写进文件了。

C:\Users\hann>echo. > newfile.txt

C:\Users\hann>type newfile.txt


C:\Users\hann>dir newfile.txt
 驱动器 C 中的卷是 Windows
 卷的序列号是 1E34-A256

 C:\Users\hann 的目录

2023/08/26  12:16                 3 newfile.txt
               1 个文件              3 字节
               0 个目录 123,609,210,880 可用字节

缺点: 创建了非0字节的“空”文件,有空行存在


mv命令

mv:移动或重命名一个文件或目录。

mv:移动文件或目录,也可用于重命名。例如,
mv file1 file2 将把file1重命名为file2,并删除file1
要移动目录及其内容,需要使用-r选项,如mv -r dir1 dir2

【英文帮助】

hann@HannYang:~$ cd --help
cd: cd [-L|[-P [-e]] [-@]] [dir]Change the shell working directory.Change the current directory to DIR.  The default DIR is the value of theHOME shell variable.The variable CDPATH defines the search path for the directory containingDIR.  Alternative directory names in CDPATH are separated by a colon (:).A null directory name is the same as the current directory.  If DIR beginswith a slash (/), then CDPATH is not used.If the directory is not found, and the shell option `cdable_vars' is set,the word is assumed to be  a variable name.  If that variable has a value,its value is used for DIR.Options:-L        force symbolic links to be followed: resolve symboliclinks in DIR after processing instances of `..'-P        use the physical directory structure without followingsymbolic links: resolve symbolic links in DIR beforeprocessing instances of `..'-e        if the -P option is supplied, and the current workingdirectory cannot be determined successfully, exit witha non-zero status-@        on systems that support it, present a file with extendedattributes as a directory containing the file attributesThe default is to follow symbolic links, as if `-L' were specified.`..' is processed by removing the immediately previous pathname componentback to a slash or the beginning of DIR.Exit Status:Returns 0 if the directory is changed, and if $PWD is set successfully when-P is used; non-zero otherwise.

【对应Dos命令】

移动文件并重命名文件和目录。

要移动至少一个文件:
MOVE [/Y | /-Y] [drive:][path]filename1[,...] destination

要重命名一个目录:
MOVE [/Y | /-Y] [drive:][path]dirname1 dirname2

  [drive:][path]filename1 指定你想移动的文件位置和名称。
  destination             指定文件的新位置。目标可包含一个驱动器号
                          和冒号、一个目录名或组合。如果只移动一个文件
                          并在移动时将其重命名,你还可以包括文件名。
  [drive:][path]dirname1  指定要重命名的目录。
  dirname2                指定目录的新名称。

  /Y                      取消确认覆盖一个现有目标文件的提示。
  /-Y                     对确认覆盖一个现有目标文件发出提示。

命令行开关 /Y 可以出现在 COPYCMD 环境变量中。这可以用命令行上
的 /-Y 替代。默认值是,除非 MOVE 命令是从一个批脚本内
执行的,覆盖时都发出提示。

Dos另有单独命名文件的命令 ren

重命名文件。

RENAME [drive:][path]filename1 filename2.
REN [drive:][path]filename1 filename2.

请注意,你不能为目标文件指定新的驱动器或路径。


chmod命令

chmod:更改文件或目录的权限。例如,chmod 755 file1将更改file1的权限,使其可读、可写和可执行。

【英文帮助】

hann@HannYang:~$ cd --help
cd: cd [-L|[-P [-e]] [-@]] [dir]Change the shell working directory.Change the current directory to DIR.  The default DIR is the value of theHOME shell variable.The variable CDPATH defines the search path for the directory containingDIR.  Alternative directory names in CDPATH are separated by a colon (:).A null directory name is the same as the current directory.  If DIR beginswith a slash (/), then CDPATH is not used.If the directory is not found, and the shell option `cdable_vars' is set,the word is assumed to be  a variable name.  If that variable has a value,its value is used for DIR.Options:-L        force symbolic links to be followed: resolve symboliclinks in DIR after processing instances of `..'-P        use the physical directory structure without followingsymbolic links: resolve symbolic links in DIR beforeprocessing instances of `..'-e        if the -P option is supplied, and the current workingdirectory cannot be determined successfully, exit witha non-zero status-@        on systems that support it, present a file with extendedattributes as a directory containing the file attributesThe default is to follow symbolic links, as if `-L' were specified.`..' is processed by removing the immediately previous pathname componentback to a slash or the beginning of DIR.Exit Status:Returns 0 if the directory is changed, and if $PWD is set successfully when-P is used; non-zero otherwise.

【对应Dos命令】

两边的文件系统属性不一样,只有attrib功能比较类似

显示或更改文件属性。

ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+X | -X] [+P | -P] [+U | -U]
       [drive:][path][filename] [/S [/D]] [/L]

  +   设置属性。
  -   清除属性。
  R   只读文件属性。
  A   存档文件属性。
  S   系统文件属性。
  H   隐藏文件属性。
  O   脱机属性。
  I   无内容索引文件属性。
   X   无清理文件属性。
  V   完整性属性。
  P   固定属性。
  U   非固定属性。
  [drive:][path][filename]
      指定属性要处理的文件。
  /S  处理当前文件夹及其所有子文件夹中
      的匹配文件。
  /D  也处理文件夹。
  /L  处理符号链接和
      符号链接目标的属性


总结

以上介绍的这些基础命令基本上Dos,Linux两系统都有,熟悉这些命令可以帮助用户更加方便地管理自己的文件和目录。当然还有文件查看类的命令,比如 more命令两系统都有这个命令;另外 linux 的 cat 对应 dos 的 TYPE。

总的来说,相比较还是Linux的外部命令更丰富一点,还有 find, stat, grep 等等这些功能强大的外部命令在Dos里没有相对应的命令(小众的非官方的自己编写的除外)。

相关文章:

Linux 终端命令之文件目录操作,对比Dos相关命令

目录 前言 基础命令&#xff08;文件目录相关的&#xff09; cd命令 【英文帮助】 【对应Dos命令】 pwd命令 【英文帮助】 【对应Dos命令】 ls命令 【英文帮助】 【对应Dos命令】 tree命令 【英文帮助】 【对应Dos命令】 mkdir命令 【英文帮助】 【对应Dos命令…...

C++学习第十八天----switch语句

1. &#xff1f;:运算符 条件运算符&#xff0c;又叫三元运算符&#xff1b; 该运算符的通用格式为&#xff1a; expression1&#xff1f;expression2 &#xff1a;expression3&#xff1b; 意义是假如1为true&#xff0c;则整个条件表达式的值为2的值&#xff0c;否则为3的值&…...

基于poi生成excel模板并生成下拉选择框

直接上代码&#xff08;有注释&#xff09; public void downloadImportTemplate(HttpServletResponse response) {try {ServletOutputStream outputStream response.getOutputStream();//创建工作表XSSFWorkbook workbook new XSSFWorkbook();//标题行的标题List<String…...

Redis五种类型

Redis 基础类型 String 应用场景 缓存功能&#xff1a;string 最常用的就是缓存功能&#xff0c;会将一些更新不频繁但是查询频繁的数据缓存起来&#xff0c;以此来减轻 DB 的压力。 底层实现 如果字符串对象保存的是一个字符串值&#xff0c; 并且这个字符串值的长度大于…...

通过IP地址如何防范钓鱼网站诈骗?

随着互联网的普及和发展&#xff0c;钓鱼网站诈骗的风险日益增加。钓鱼网站通过伪装成合法网站&#xff0c;诱导用户输入个人敏感信息进而进行非法活动。IP地址作为网络通信的基本单位&#xff0c;可以在一定程度上帮助我们防范钓鱼网站诈骗。本文将探讨IP地址防范钓鱼网站诈骗…...

useEffect使用详解

useEffect是React中的一个钩子函数&#xff0c;用于处理副作用操作。副作用是指在组件渲染过程中&#xff0c;可能会对外部环境产生影响的操作&#xff0c;比如数据获取、订阅事件、操作DOM等。 useEffect接受两个参数&#xff1a;一个是副作用函数&#xff0c;另一个是依赖数…...

element-table的动态操作,自动以表格,动态新增行、列,删除行列

灵活的自定义表格行列以及增删改查的操作,右键选中列则是列的删除&#xff0c;效果如下 <template><div class"st-table"><div style"width: 100%"><el-button click"addRow()" type"primary" icon"CircleP…...

python--文件管理系统

文件系统管理项目说明文档 项目说明 基本任务 在内存中开辟一个空间作为文件存储器&#xff0c;在其上实现一个简单的文件系统退出这个文件系统时&#xff0c;需要该文件系统的内容保存到磁盘上&#xff0c;以便下次可以将其回复到内存中来 具体要求 文件存储空间管理可采取链…...

uniapp 微信小程序:RecorderManager 录音DEMO

uniapp 微信小程序&#xff1a;RecorderManager 录音DEMO 简介index.vue参考资料 简介 使用 RecorderManager 实现录音。及相关的基本操作。&#xff08;获取文件信息&#xff0c;上传文件&#xff09; 此图包含Demo中用于上传测试的服务端程序upload.exe&#xff0c;下载后用…...

__call__和__init__和__new__和__str__和__repr__

目录 一、__call__ 二、__init__和__new__ 三、__str__ 四、__repr__ python从小白到总裁完整教程目录:https://blog.csdn.net/weixin_67859959/article/details/129328397?spm1001.2014.3001.5502 一、__call__ 对象后面加括号时&#xff0c;触发执行。注&#xff1a;构…...

设计模式--工厂模式(Factory Pattern)

一、 什么是工厂模式 工厂模式&#xff08;Factory Pattern&#xff09;是一种创建型设计模式&#xff0c;它提供了一种创建对象的接口&#xff0c;但是将对象的实例化过程推迟到子类中。工厂模式允许通过调用一个共同的接口方法来创建不同类型的对象&#xff0c;而无需暴露对…...

【Android】 No matching variant of com.android.tools.build:gradle:[版本号] was found

项目报错 No matching variant of com.android.tools.build:gradle:8.1.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute …...

650V 1200V碳化硅二极管MOS管规格书参数,6A 8A 10A 15A 20A 封装TO220低VF电压 低内阻特性

650V碳化硅二极管6A 8A 15A提供样品 650V 40毫欧超结COOL MOS提供样品 650V 超结COOL MOS资料 国产替代 650V 1200V碳化硅二极管技术资料...

python基础—python6种基本数据类型及数据类型之间转换

文章目录 一、python标准数据类型&#xff08;一&#xff09;数字类型整型&#xff1a;int浮点型&#xff1a;flaot布尔型&#xff1a;bool复数类型&#xff1a;complex &#xff08;二&#xff09;字符串&#xff08;三&#xff09;列表类型&#xff08;四&#xff09;元组类型…...

Axure RP

Axure RP 简介下载安装汉化注册 简介 Axure RP&#xff08;Rapid Prototyping&#xff09;是一款交互式原型设计工具&#xff0c;用于创建高保真的交互式界面原型和线框图。它主要用于用户体验&#xff08;UX&#xff09;和用户界面&#xff08;UI&#xff09;设计&#xff0c…...

java使用ExcelExportUtil.exportBigExcel导出大文件(非分页)

网上看到很多使用这个方法处理的时候&#xff0c;大多使用的分页进行查询&#xff0c;但是当遇到特殊的产品需求&#xff0c;比如A类型数据&#xff0c;多条记录就显示多行&#xff0c;B类型的要求存在多条记录时&#xff0c;就进行汇总后只显示一条&#xff0c;这就导致无法使…...

PlantUML文本绘制类图

记录下文本绘制类图的语法 参考 https://juejin.cn/post/6844903731293585421 类的UML表示 使用UML表示一个类&#xff0c;主要由三部分组成。类名、属性、方法。其中属性和方法的访问修饰符用 - 、# 、 表示 private、protected、public。 如图所示&#xff0c;表示A类有一个…...

5分钟理解NPL算法 之 马尔可夫链 Markov Chain

马尔可夫链&#xff08;Markov Chain&#xff09; 马尔可夫链是一种简单的推理模型。用于描述受当前事件影响下的下一事件发生概率。在预测学科中广泛应用。例如股票预测、文字推理、路线推荐等。 他的核心思路是&#xff1a;假设事件顺序为: X 1 , X 2 , X 3 , . . . . . X…...

C#_GDI+ 绘图编程入门

官网提供相关API GDI 基本图形功能_drawing 高级二维和矢量图形功能_drawing2D GDI 图像处理功能_Imaging GDI 排版功能_text Windows 窗体应用程序提供打印功能_Printing 像素 构成图像的最小单位就是像素&#xff1b;屏幕上显示不管是位图或者矢量图&#xff0c;当描述…...

自己写一个svg转化为安卓xml的工具类

自己写一个svg转化为安卓xml的工具类_张风捷特烈的博客-CSDN博客 svg资源阿里巴巴矢量资源网站:iconfont-阿里巴巴矢量图标库 感觉一般的svg到Android可用的xml差异有点规律&#xff0c;主要的就是path 秉承着能用代码解决的问题&#xff0c;绝对不动手。能够靠智商解决的问题…...

基于随机森林的机器启动识别,基于随机森林的智能家居电器启动识别

目录 背影 摘要 随机森林的基本定义 随机森林实现的步骤 基于随机森林的机器启动识别 代码下载链接: 基于随机森林的家用电器启动识别,基于RF的电器启动识别,基于随机森林的智能家居启动检测-深度学习文档类资源-CSDN文库 https://download.csdn.net/download/abc991835105/…...

Apache Doris 极简运维之BE扩缩容(1)

Apache Doris 极简运维之BE扩缩容&#xff08;1&#xff09; 一、环境信息硬件信息软件信息 二、缩容2.1 DROP BACKEND缩容2.2 DECOMMISSION BACKEND缩容2.2.1 缩容前2.2.2 缩容中2.2.3 缩容后 三、扩容3.1 扩容前3.2 扩容中3.3 扩容后 四、总结 一、环境信息 已部署三个BE节点…...

MySQL每日一练--校园教务系统

一丶数据库名称&#xff1a;SchoolDB 二丶数据库表信息&#xff1a;角色信息表 表名&#xff1a; t_role 主键&#xff1a; r_id 序号 字段名称 字段说明 类别 位数 属性 备注 1 r_id 角色编号 int 主键 自动增长 2 r_name_EN 角色名&#xff08;英…...

9.阿里Sentinel哨兵

1.Sentinel Sentinel&#xff08;哨兵&#xff09;是由阿里开源的一款流量控制和熔断降级框架&#xff0c;用于保护分布式系统中的应用免受流量涌入、超载和故障的影响。它可以作为微服务架构中的一部分&#xff0c;用于保护服务不被异常流量冲垮&#xff0c;从而提高系统的稳定…...

设计模式之工厂方法模式

目录 工厂方法模式 简介 优缺点 结构 使用场景 实现 1.抽象产品 2.具体产品 3.抽象工厂 4.具体工厂 5.调用 总结 抽象工厂模式 简介 结构 实现 区别 工厂方法模式 简介 提供一个用于创建对象的接口(工厂接口)&#xff0c;让其实现类(工厂实现类)决定实例化哪…...

【案例教程】基于R语言的物种气候生态位动态量化与分布特征模拟

在全球气候快速变化的背景下&#xff0c;理解并预测生物种群如何应对气候变化&#xff0c;特别是它们的地理分布如何变化&#xff0c;已经变得至关重要。利用R语言进行物种气候生态位动态量化与分布特征模拟&#xff0c;不仅可以量化描述物种对环境的需求和适应性&#xff0c;预…...

Moonbeam生态跨链互操作项目汇总

立秋已过&#xff0c;今年的夏天已经接近尾声&#xff0c;即将迎来凉爽的秋天。Moonbeam生态一同以往持续成长&#xff0c;在8月也举办了不少活动、完成集成合作以及协议更新。让我们一同快速了解Moonbeam生态项目近期发生的大小事件吧&#xff01; Moonwell Moonwell是一个建…...

基于社会群体算法优化的BP神经网络(预测应用) - 附代码

基于社会群体算法优化的BP神经网络&#xff08;预测应用&#xff09; - 附代码 文章目录 基于社会群体算法优化的BP神经网络&#xff08;预测应用&#xff09; - 附代码1.数据介绍2.社会群体优化BP神经网络2.1 BP神经网络参数设置2.2 社会群体算法应用 4.测试结果&#xff1a;5…...

208. 实现 Trie (前缀树)

题目描述 Trie&#xff08;发音类似 “try”&#xff09;或者说 前缀树 是一种树形数据结构&#xff0c;用于高效地存储和检索字符串数据集中的键。这一数据结构有相当多的应用情景&#xff0c;例如自动补完和拼写检查。 请你实现 Trie 类&#xff1a; Trie() 初始化前缀树对…...

adb使用总结

adb连接到模拟器 adb devices 打开模拟器&#xff0c;找到设置。 多次点击版本号&#xff0c;切换到开发者模式 搜索进入开发者选项 开启USB调试 此时在终端输入adb devices就连接上了 使用adb查看安卓手机架构 adb shell getprop ro.product.cpu.abi 进入安卓手机的shell …...

go:正确引入自己编写的包(如何在 Go 中正确引入自己编写的包)

前言 目录如下&#xff1a; 具体教程 1. 工作空间&#xff08;我的是根目录&#xff09;新建 go.work 文件 文件内容如下&#xff1a; go 1.21.0use (./tuchuang./tuchuang/testm ) 2. 添加go.mod文件 1. 包文件夹下 进入testm目录执行 go mod init testModule 2. 引用目…...

cortex-A7核PWM实验--STM32MP157

实验目的&#xff1a;驱动风扇&#xff0c;蜂鸣器&#xff0c;马达进行工作 目录 一&#xff0c;PWM相关概念 有源蜂鸣器和无源蜂鸣器 二&#xff0c;分析电路图&#xff0c;框图 三&#xff0c;分析RCC章节 1&#xff0c;确定总线连接 2&#xff0c;根据总线内容确定基…...

电工-学习电工有哪些好处

学习电工有哪些好处&#xff1f;在哪学习电工&#xff1f; 学习电工有哪些好处&#xff1f;在哪学习电工&#xff1f;学习电工可以做什么&#xff1f;优势有哪些&#xff1f; 学习电工可以做什么&#xff1f;学习电工有哪些好处&#xff1f; 就业去向&#xff1a;可在企业单位…...

Redis内存空间预估与内存优化策略:保障数据安全与性能的架构实践AIGC/AI绘画/chatGPT/SD/MJ

推荐阅读 AI文本 OCR识别最佳实践 AI Gamma一键生成PPT工具直达链接 玩转cloud Studio 在线编码神器 玩转 GPU AI绘画、AI讲话、翻译,GPU点亮AI想象空间 资源分享 「java、python面试题」来自UC网盘app分享&#xff0c;打开手机app&#xff0c;额外获得1T空间 https://dr…...

Pandas数据分析教程-数据处理

pandas-02-数据清洗&预处理 B. 数据处理1. 重复值处理2. map逐元素转换3. 值替换4. 改变索引值5. 离散化与分箱6. 检测过滤异常值7. 排列与随机采样8. 根据类别生成one-hot向量,向量化文中用S代指Series,用Df代指DataFrame 数据清洗是处理大型复杂情况数据必不可少的步骤…...

php 多维数组排序,根据某一列排序(array_multisort()和array_column()联用)

array_multisort()和array_column()联用效果直接叠满,11>100 先来看下两个函数的介绍和用法 array_column(): 一般模式,不需要其中字段作为id,只需要提取val值 <?php // 可能从数据库中返回数组 $a [[id > 5698, first_name > Peter, last_name > G…...

框架分析(5)-Django

框架分析&#xff08;5&#xff09;-Django 专栏介绍Django核心概念以及组件讲解模型&#xff08;Model&#xff09;视图&#xff08;View&#xff09;模板&#xff08;Template&#xff09;路由&#xff08;URLconf&#xff09;表单&#xff08;Form&#xff09;后台管理&…...

常见前端面试之VUE面试题汇总七

20. 对 vue 设计原则的理解 1.渐进式 JavaScript 框架&#xff1a;与其它大型框架不同的是&#xff0c;Vue 被设计 为可以自底向上逐层应用。Vue 的核心库只关注视图层&#xff0c;不仅易于上 手&#xff0c;还便于与第三方库或既有项目整合。另一方面&#xff0c;当与现代化的…...

空时自适应处理用于机载雷达——空时处理基础知识(Matla代码实现)

&#x1f4a5;&#x1f4a5;&#x1f49e;&#x1f49e;欢迎来到本博客❤️❤️&#x1f4a5;&#x1f4a5; &#x1f3c6;博主优势&#xff1a;&#x1f31e;&#x1f31e;&#x1f31e;博客内容尽量做到思维缜密&#xff0c;逻辑清晰&#xff0c;为了方便读者。 ⛳️座右铭&a…...

磁盘阵列/视频集中存储/安防监控视频智能分析平台新功能:安全帽/反光衣/安全带AI识别详解

人工智能技术已经越来越多地融入到视频监控领域中&#xff0c;近期我们也发布了基于AI智能视频云存储/安防监控视频AI智能分析平台的众多新功能&#xff0c;该平台内置多种AI算法&#xff0c;可对实时视频中的人脸、人体、物体等进行检测、跟踪与抓拍&#xff0c;支持口罩佩戴检…...

23款奔驰GLE450轿跑升级原厂外观暗夜套件,战斗感满满的

升级的方案基本都是替换原来车身部位的镀铬件&#xff0c;可能会有人问&#xff1a;“难道直接用改色膜贴黑不好吗&#xff1f;”如果是贴膜的话&#xff0c;第一个是颜色没有那么纯正&#xff0c;这些镀铬件贴黑的技术难度先抛开不说&#xff0c;即使贴上去了&#xff0c;那过…...

win10系统rust串口通信实现

一、用cargo创建新工程 命令&#xff1a;cargo new comport use std::env; use std::{thread, time}; use serialport::{DataBits, StopBits, Parity, FlowControl}; use std::io::{self, Read, Write}; use std::time::Duration;fn main() -> io::Result<()> {let m…...

新生代与老年代

在Java虚拟机&#xff08;JVM&#xff09;中&#xff0c;内存被划分为多个不同的区域&#xff0c;其中包括新生代&#xff08;Young Generation&#xff09;和老年代&#xff08;Old Generation&#xff09;。 新生代是用于存储新创建的对象的区域。大多数对象在创建后很快就变…...

Microsoft正在将Python引入Excel

Excel和Python这两个世界正在碰撞&#xff0c;这要归功于Microsoft的新集成&#xff0c;以促进数据分析和可视化 Microsoft正在将流行的编程语言Python引入Excel。该功能的公共预览版现已推出&#xff0c;允许Excel用户操作和分析来自Python的数据。 “您可以使用 Python 绘图…...

知识速递(六)|ChIP-seq分析要点集锦

书接上文组学知识速递&#xff08;五&#xff09;|ChIP-seq知多少&#xff1f;&#xff0c;当我们实验完成&#xff0c;拿到下机数据之后&#xff0c;我们最关心的就是&#xff0c;这个数据能不能用&#xff1f;所谓数据能不能用&#xff0c;其实我们会重点关注以下问题&#x…...

【附安装包】EViews 13.0安装教程|计量经济学|数据处理|建模分析

软件下载 软件&#xff1a;EViews版本&#xff1a;13.0语言&#xff1a;英文大小&#xff1a;369.46M安装环境&#xff1a;Win11/Win10/Win8/Win7硬件要求&#xff1a;CPU2.0GHz 内存4G(或更高&#xff09;下载通道①百度网盘丨64位下载链接&#xff1a;https://pan.baidu.com…...

Java 语言实现快速排序算法

【引言】 快速排序算法是一种常用且高效的排序算法。它通过选择一个基准元素&#xff0c;并将数组分割成两个子数组&#xff0c;一边存放比基准元素小的元素&#xff0c;另一边存放比基准元素大的元素。然后递归地对这两个子数组进行排序&#xff0c;最终达到整个数组有序的目的…...

Config: Git 环境搭建

...

最新AI系统ChatGPT网站程序源码/搭建教程/支持GPT4.0/Dall-E2绘画/支持MJ以图生图/H5端/自定义训练知识库

一、正文 SparkAi系统是基于国外很火的ChatGPT进行开发的Ai智能问答系统。本期针对源码系统整体测试下来非常完美&#xff0c;可以说SparkAi是目前国内一款的ChatGPT对接OpenAI软件系统。 那么如何搭建部署AI创作ChatGPT&#xff1f;小编这里写一个详细图文教程吧&#xff01…...

leetcode 392. 判断子序列

2023.8.25 本题要判断子序列&#xff0c;可以使用动态规划来做&#xff0c;定义一个二维dp数组。 接下来就是常规的动态规划求解子序列的过程。 给出两种定义dp数组的方法。 二维bool型dp数组&#xff1a; class Solution { public:bool isSubsequence(string s, string t) …...