pwd

How do I print the current working directory of another user in linux?

为君一笑 提交于 2021-01-29 16:13:39
问题 Is there a command line I can issue to see what directory another user is currently working in? This would be like using >pwd but for the other user. 回答1: There's a cwd symlink in every process' /proc folder, but as a commoner you wouldn't have any rights to read any other's proc folder - only your own: [marc@panic home]$ ls -l /proc/$$/cwd lrwxrwxrwx. 1 marc marc 0 May 5 12:06 /proc/16257/cwd -> /home ^^^^^---cwd [marc@panic home]$ ^^^^---cwd 来源: https://stackoverflow.com/questions/23478833

Docker COPY no such file or directory

浪尽此生 提交于 2021-01-07 10:50:42
问题 Building docker image fails on copy task. No such file or directory. I am using the hello world example from spring Building from openjdk:8-jdk-alpine Run echo ${PWD} prints / Run ls prints a set of normal directories (/usr /var etc) but no project files are present Why is docker not using the WORKING directory? FROM openjdk:8-jdk-alpine VOLUME /tmp ARG DEPENDENCY=target/dependency COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib COPY ${DEPENDENCY}/META-INF /app/META-INF COPY ${DEPENDENCY}/BOOT-INF

Docker COPY no such file or directory

假如想象 提交于 2021-01-07 10:47:31
问题 Building docker image fails on copy task. No such file or directory. I am using the hello world example from spring Building from openjdk:8-jdk-alpine Run echo ${PWD} prints / Run ls prints a set of normal directories (/usr /var etc) but no project files are present Why is docker not using the WORKING directory? FROM openjdk:8-jdk-alpine VOLUME /tmp ARG DEPENDENCY=target/dependency COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib COPY ${DEPENDENCY}/META-INF /app/META-INF COPY ${DEPENDENCY}/BOOT-INF

Docker COPY no such file or directory

主宰稳场 提交于 2021-01-07 10:47:02
问题 Building docker image fails on copy task. No such file or directory. I am using the hello world example from spring Building from openjdk:8-jdk-alpine Run echo ${PWD} prints / Run ls prints a set of normal directories (/usr /var etc) but no project files are present Why is docker not using the WORKING directory? FROM openjdk:8-jdk-alpine VOLUME /tmp ARG DEPENDENCY=target/dependency COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib COPY ${DEPENDENCY}/META-INF /app/META-INF COPY ${DEPENDENCY}/BOOT-INF

Docker COPY no such file or directory

╄→尐↘猪︶ㄣ 提交于 2021-01-07 10:45:40
问题 Building docker image fails on copy task. No such file or directory. I am using the hello world example from spring Building from openjdk:8-jdk-alpine Run echo ${PWD} prints / Run ls prints a set of normal directories (/usr /var etc) but no project files are present Why is docker not using the WORKING directory? FROM openjdk:8-jdk-alpine VOLUME /tmp ARG DEPENDENCY=target/dependency COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib COPY ${DEPENDENCY}/META-INF /app/META-INF COPY ${DEPENDENCY}/BOOT-INF

Docker COPY no such file or directory

不打扰是莪最后的温柔 提交于 2021-01-07 10:45:13
问题 Building docker image fails on copy task. No such file or directory. I am using the hello world example from spring Building from openjdk:8-jdk-alpine Run echo ${PWD} prints / Run ls prints a set of normal directories (/usr /var etc) but no project files are present Why is docker not using the WORKING directory? FROM openjdk:8-jdk-alpine VOLUME /tmp ARG DEPENDENCY=target/dependency COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib COPY ${DEPENDENCY}/META-INF /app/META-INF COPY ${DEPENDENCY}/BOOT-INF

目录处理命令

十年热恋 提交于 2020-12-25 12:04:40
创建目录:mkdir mkdir -p [目录名] -p 递归创建 命令英文愿意:make directories 切换目录:cd cd [目录] 命令英文原意:change directory 简化操作: cd: 进入当前用户的家目录 cd 目标目录:进入目标目录 cd -:回到上一次所在的目录 cd ~:进入当前用户家目录 cd . :进入当前目录 cd . .:进入上一级目录 查看所在目录位置:pwd pwd 命令英文原意:print working directory 注:pwd查看的是绝对路径。 绝对路径:从根目录开始制定,一级一级递归查找。在任何 目录下,都能进入指定位置。 如: [root@localhost~]#cd /etc/ 相对路径:参照当前所在目录,进行查找。 如:[root@localhost~]#cd ../usr/local/src/ 删除空目录:rmdir rmdir [目录名] 命令英文原意:remove empty directories 删除文件或目录:rm rm -rf [文件或目录] -r:删除目录 -f:强制删除 命令英文原意:remove 复制命令:cp cp [选项] [原文件或目录] [目标目录] 命令英文原意:copy 选项: -r 复制目录 -p 连带文件属性复制 -d 若原文件是链接文件,则复制链接属性 -a 相当于-dpr

shell中$(cd \"$(dirname \"$0\")\",pwd) 解析

本秂侑毒 提交于 2020-04-07 19:02:27
BIN_FOLDER = $(cd "$(dirname "$0")",pwd) 解析: 1、取当前运行脚本的所在路径: $0 2、取当前脚本所在路径的父目录: dirname "$0" 3、取返回的父目录的值: $(dirname "$0") 4、cd到返回的父目录: cd "$(dirname "$0")" 5、 输出地址 :  cd "$(dirname "$0")",pwd 6、取输出的地址,并赋值给BIN_FOLDER: BIN_FOLDER = $(cd "$(dirname "$0")",pwd) 来源: https://www.cnblogs.com/Linux-guowen/p/12654795.html

MongoDB用户相关

故事扮演 提交于 2020-04-05 15:37:25
1.用户权限结构图 2.可以优先创建标红的MongoDB用户 3.创建用户命令列表 创建用户一定要在具体的db下执行 use admin Root用户: db.createUser({user:"root", pwd:“pwd", roles:[{role:"root", db:"admin"}]})(一般不要用这个用户) 仅次于ROOT用户的: db.createUser({ user:'admin',pwd:'pwd', roles:[ {role:'clusterAdmin',db:'admin'}, {role:'userAdminAnyDatabase',db:'admin'}, {role:'dbAdminAnyDatabase',db:'admin'}, {role:'readWriteAnyDatabase',db:'admin'} ]}) 门管理用户的: db.createUser({user:"userAdmin", pwd:“pwd", roles:[{role:"userAdminAnyDatabase", db:"admin"}]}) 备份用户的: db.createUser({user:"backup", pwd:" pwd ", roles:[{role:"backup", db:"admin"}]}) 恢复用户: db.createRole(

Docker部署Nginx、Tomcat集群

前提是你 提交于 2020-04-02 14:29:34
Tomcat集群由多个tomcat组成,使用Nginx的好处是可以实现负载均衡和动静分离。 使用Docker的好处是~~~我们不需要复杂的配置,只需要执行简单的命令就能拉取已有的官方docker镜像,再通过一条命令就能运行我们的实例了。对于多个Tomcat,我们使用相同的镜像,然后使用简单的命令,就能创建不同的tomcat container实例。 1.拉去镜像 $ docker pull tomcat:8-jre8-alpine $ docker pull nginx:latest $ docker images 2.创建tomcat文件夹和webapps的交换文件夹,并创建container $ docker run --name tomcat1 -p 18080:8080 -v $PWD/webapps:/usr/local/tomcat/webapps -d tomcat:8-jre8-alpine # cc8d9b8bc8a90d0768df15f94ae2cb37694021cf637d0610d10eaee669b0d5bad $ docker run --name tomcat2 -p 28080:8080 -v $PWD/webapps:/usr/local/tomcat/webapps -d tomcat:8-jre8-alpine #