alias

树状图展示终端目录内容-tree

浪尽此生 提交于 2019-12-01 12:34:53
以树状图列出目录的内容,让你一目了然 执行 tree 指令,它会列出指定目录下的所有文件,包括子目录里的文件。 安装 我们通过包管理工具可以方便的安装它 mac - brew install tree debian系列 - apt install tree CentOS - yum - -y install tree 使用 语法 : tree [- aACdDfFgilnNpqstux][- I <范本样式>][- P <范本样式>][目录...] 常用命令 -a 显示所有文件和目录。 -C 在文件和目录清单加上色彩,便于区分各种类型。 -D 列出文件或目录的更改时间。 -f 在每个文件或目录之前,显示完整的相对路径名称。 -s 列出文件或目录大小。 -t 用文件和目录的更改时间排序。 如输入命令 tree -aCDFt 其他命令 -A 使用ASNI绘图字符显示树状图而非以ASCII字符组合。 -d 显示目录名称而非内容。 -F 在执行文件,目录,Socket,符号连接,管道名称名称,各自加上"*","/","=","@","|"号。 -g 列出文件或目录的所属群组名称,没有对应的名称时,则显示群组识别码。 -i 不以阶梯状列出文件或目录名称。 -I 不显示符合范本样式的文件或目录名称。 -l 如遇到性质为符号连接的目录,直接列出该连接所指向的原始目录。 -N

How to change icon of alias created using applescript?

本秂侑毒 提交于 2019-12-01 10:50:42
问题 I have an applescript which creates a shortcut on a desktop to an executable on the file system. The excutable has the standard exec icon . Is it possible to change the icon to point to say an icns file ? I've read you can do it using a third party program as mentioned in Change icon of folder with AppleScript? but is it possible without using an external program to do this ? This is my script set source_file to (POSIX file "path to my exectuable") tell application "Finder" make new alias

Facebook social plugin comments after URL change

六眼飞鱼酱① 提交于 2019-12-01 10:29:49
Just a simple question, I had facebook comments integrated in my page here: http://www.bbcnepalidrama.com/main/node/3 Now I have changed the URL alias like this: http://www.bbcnepalidrama.com/main/about I have also set a 301 redirect in the old URL which redirects to the new one. The Question is how do I get the old comments in this URL? They are missing now. I think, that these comments will be forever associated with that URL and since you've changed it, as far as FB is concerned you are pointing to a different URL. you can specify the old URL as “canonical” with an og:url meta tag. see the

How can I make an alias to a singleton function?

我只是一个虾纸丫 提交于 2019-12-01 09:57:12
问题 I would like to make an alias in C++ to singleton calling so instead of calling MYCLASS::GetInstance()->someFunction(); each time, I could call just someFunctionAlias(); in my code. 回答1: Use a static function. namespace ... { void someFunction() { MYCLASS::GetInstance()->someFunction(); } }; Edit: Sorry lads, I wrote static someFunction and meant void someFunction. 回答2: typedefs are used for type aliases but can't be used as call alias. functions (such as suggested as by DeadMG) can be used

nginx虚拟目录(alias与root的区别)

社会主义新天地 提交于 2019-12-01 09:37:00
nginx貌似没有虚拟目录的说法,因为它本来就是完完全全根据目录来设计并工作的。 如果非要给nginx安上一个虚拟目录的说法,那就只有alias标签比较“像”,干脆来说说alias标签和root标签的区别吧。 最基本的区别:alias指定的目录是准确的,root是指定目录的上级目录,并且该上级目录要含有location指定名称的同名目录。另外,根据前文所述,使用alias标签的目录块中不能使用rewrite的break。 说不明白,看下配置: location /abc/ { alias /home/html/abc/; } 在这段配置下,http://test/abc/a.html就指定的是/home/html/abc/a.html。这段配置亦可改成 location /abc/ { root /home/html/; } 这样,nginx就会去找/home/html/目录下的abc目录了,得到的结果是相同的。 但是,如果我把alias的配置改成: location /abc/ { alias /home/html/def/; } 那么nginx将会从/home/html/def/取数据,这段配置还不能直接使用root配置,如果非要配置,只有在/home/html/下建立一个 def->abc的软link(快捷方式)了。 一般情况下,在location /中配置root

Nginx的 alias 与 root 的区别

被刻印的时光 ゝ 提交于 2019-12-01 09:36:20
nginx貌似没有虚拟目录的说法,因为它本来就是完完全全根据目录来设计并工作的。 如果非要给nginx安上一个虚拟目录的说法,那就只有alias标签比较“像”,干脆来说说alias标签和root标签的区别吧。 最基本的区别:alias指定的目录是准确的,root是指定目录的上级目录,并且该上级目录要含有location指定名称的同名目录。另外,根据前文所述,使用alias标签的目录块中不能使用rewrite的break。 说不明白,看下配置: location /abc/ { alias /home/html/abc/; } 在这段配置下, http://test/abc/a.html 就指定的是/home/html/abc/a.html。这段配置亦可改成 location /abc/ { root /home/html/; } 这样,nginx就会去找/home/html/目录下的abc目录了,得到的结果是相同的。 但是,如果我把alias的配置改成: location /abc/ { alias /home/html/def/; } 那么nginx将会从/home/html/def/取数据,这段配置还不能直接使用root配置,如果非要配置,只有在/home/html/下建立一个 def->abc的软link(快捷方式)了。 一般情况下,在location /中配置root

alias指令:设置命令别名

梦想的初衷 提交于 2019-12-01 09:32:45
alias指令:设置命令别名 alias: usage: alias [-p] [name[=value] ... ] 1. 语法 alias [参数][命令别名]=[原命令名称] 2. 功能介绍 该指令主要用于为原命令定义新的别名,以便书写或者记忆。 3. 参数说明 参数功能说明 -p 向标准输出设备发送已经存在的命令别名 [命令别名]=[原命令名称] 定义命令别名,即使用“别名”代替“原命令名称”,但最终实际使用到的命令仍然是原命令 4.示例 4.1 设置命令别名 在ubuntu下,我们会经常使用命令 ll 来代替命令 ls -al 但是在mac中没有这个命令。于是我们便利用alias来实现这个功能,并且添加上其他的参数让我们更加方便使用。执行命令 # 为了方便看文件或者目录的大小,加多一个参数h # 参数说明: # a-显示隐藏文件 # l-显示文件的详细信息 # h-以适合的单位进行文件或者目录大小的显示 alias ll='ls -alh' 命令执行完毕后,我们执行一次ll进行尝试,控制台输出如下: kevin@uc:~/Downloads/mac$ ll total 173M drwxrwxr-x 2 kevin kevin 4.0K 9月 25 16:20 . drwxr-xr-x 8 kevin kevin 4.0K 9月 29 13:59 .. -rw-rw-r-

C#: Globally alias a generic class name?

百般思念 提交于 2019-12-01 09:26:36
in some project we are using Generics, and we get a lot of lines like this: Line<SomeTClass,SomeCClass> myLine = (Line<SomeTClass,SomeCClass>)LineFactory.CreateLine(...) We can declare local alias, with using X = Line<SomeTClass,SomeCClass> . Then we can write, X myLine = (X)LineFactory.CreateLine(...) . We have a lot a combination of <T,C> but we often use the same. Is it possible de declare the using globally, so that we won't have to declare the alias in each file? No such thing as a global alias. What you can do is use type inference to simplify your declarations: var myLine = (Line

Are there standard aliases for modules in Python?

久未见 提交于 2019-12-01 09:15:55
Following the guidelines proposed in this post , I am changing all the from module import function function(agt) by: import module as mdl mdl.function(agt) in my codes. I am trying to use commonly used aliases rather than personal ones. Is there a list of some kind on the internet summing-up all well-used aliases ? For instance, these appear to be pretty common: import numpy as np import math as m import matplotlib.pyplot as plt What about aliases for scipy.linalg , time , scipy.io , cmath and so on ? Which do you use ? Feel free to give other aliases, if no such list exist yet, I am willing

I can't get this simple LLDB alias to work

倖福魔咒の 提交于 2019-12-01 07:54:26
I want to create an LLDB alias ps, such that ps foo becomes print [self foo] I've been watching the LLDB talk (WWDC session 321 on iTunes), and based on that, it looks like the alias to do that should be this one: command alias ps print [ self %1 ] but it doesn't work. Here I've given my app delegate a simple "count" method that returns an integer: (lldb) command alias ps print [ self %1 ] (lldb) ps count error: invalid operands to binary expression ('AppDelegate *' and 'int') error: 1 errors parsing expression (lldb) print [ self count ] (int) $6 = 2 (lldb) What am I missing? It seems