-
2021-09-07 10:15:29
1,将abc追加到文件a.txt最后
echo "abc" >> a.txt
(echo "abc" > a.txt, a.txt的内容变成abc)
2,将文件b.txt中的内容追加到a.txt最后
cat b.txt >> a.txt
更多相关内容 -
shell打开文件夹命令_如何使用Windows的Shell命令打开隐藏的系统文件夹
2020-09-10 22:37:42shell打开文件夹命令Many of the hidden system folders in Windows are identifiedin the Windows Registry along with a class ID (CLSID) key, special folder names, and the folders’ locations on your PC....shell打开文件夹命令
Many of the hidden system folders in Windows are identified in the Windows Registry along with a class ID (CLSID) key, special folder names, and the folders’ locations on your PC. Using those special folder names along with the Shell command means that even hidden folders buried deep in your file system are always just a few keystrokes away.
Windows注册表中会标识Windows中许多隐藏的系统文件夹,以及类ID(CLSID)项,特殊文件夹名称以及这些文件夹在PC上的位置。 与Shell命令一起使用这些特殊的文件夹名称,意味着即使埋在文件系统深处的隐藏文件夹也总是只需敲击几下即可。
什么是CLSID密钥? (What Are CLSID Keys?)
Specific folder locations (and also some software components) are given a CLSID that allows Windows and other programs to easily identify them without knowing their exact name. The CLSID keys, common names, and full paths to those folders are stored as entries in the Windows Registry. It’s kind of similar to how each computer on your network has a regular name that’s easy for you to remember–when you use the computer name, Windows looks up that computer’s IP address on your behalf.
为特定的文件夹位置(以及一些软件组件)提供了一个CLSID,使Windows和其他程序可以在不知道其确切名称的情况下轻松识别它们。 这些文件夹的CLSID密钥,通用名称和完整路径作为条目存储在Windows注册表中。 这有点类似于网络上的每台计算机都具有一个易于记住的常规名称-当您使用计算机名称时,Windows会代表您查找该计算机的IP地址。
In the same way, programs can use a common name for a folder in the Windows structure and rely on the actual location being stored as a CLSID key in the Registry. The shell objects we’ll be working with are listed in the Registry at the following location:
以相同的方式,程序可以为Windows结构中的文件夹使用通用名称,并依赖于将实际位置作为CLSID密钥存储在注册表中。 我们将使用的shell对象在注册表中的以下位置列出:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions
Each subkey in the long list inside the
FolderDescriptions
key represents a special folder. The name of each key is that folder’s CLSID. Click any one of them and you’ll see several important values attached to that key, such asName
(the common name of the folder) andRelativePath
(the actual path where the folder is located).FolderDescriptions
键内的长列表中的每个子键代表一个特殊的文件夹。 每个密钥的名称是该文件夹的CLSID。 单击其中任何一个,您将看到几个附加到该键的重要值,例如Name
(文件夹的公用名)和RelativePath
(文件夹所在的实际路径)。如何发出Shell命令 (How to Issue the Shell Command)
So, what can you do with this information? You can issue a special command named Shell followed by a folder’s common name to open that folder. If that sounds a little simple, that’s the whole point. You can issue the Shell command from the Run dialog box (Windows+R), the Windows File Explorer address bar, or even the Internet Explorer address bar. Just type the command using the following format:
那么,您可以使用此信息做什么? 您可以发出一个名为Shell的特殊命令,后跟一个文件夹的通用名称以打开该文件夹。 如果这听起来有点简单,那就很重要了。 您可以从“运行”对话框(Windows + R),Windows File Explorer地址栏甚至Internet Explorer地址栏发出Shell命令。 只需使用以下格式键入命令:
shell:<name>
Here’s an example. Say you wanted to open the folder containing the pictures you have associated with your Windows account. Instead of browsing down into your account’s AppData folder (a hidden folder, by the way) and then finding the folder with your account pictures, you could just fire up the Run dialog, issue the following command, and then hit Enter:
这是一个例子。 假设您要打开包含与Windows帐户关联的图片的文件夹。 无需浏览到帐户的AppData文件夹(顺便说一句是隐藏文件夹),然后找到包含帐户图片的文件夹,您只需启动“运行”对话框,发出以下命令,然后按Enter:
shell:AccountPictures
It’s hard to argue that’s not faster, even if you’re not already a keyboard junkie.
即使您还不是键盘迷,也很难说这样做不会更快。
哪些文件夹名称可用? (What Folder Names Are Available?)
That’s all well and good, but is it really worth it to comb through all those Registry entries looking for folder names just to save a little time browsing through folders later? Maybe, maybe not. Fortunately, that’s what you’ve got us for. Here is a list of all the folder names you can use after the shell command, along with the relative locations of those folders.
这一切都很好,但是在所有注册表项中查找文件夹名称是否真的值得,以节省以后浏览文件夹的时间呢? 也许吧,也许不是。 幸运的是,这就是您要我们寻求的。 这是在shell命令后可以使用的所有文件夹名称的列表,以及这些文件夹的相对位置。
shell:AccountPictures – %AppData%\Microsoft\Windows\AccountPictures
shell:AccountPictures –%AppData%\ Microsoft \ Windows \ AccountPictures
shell:AddNewProgramsFolder – Control Panel\All Control Panel Items\Get Programs
shell:AddNewProgramsFolder –控制面板\所有控制面板项目\获取程序
shell:Administrative Tools – %AppData%\Microsoft\Windows\Start Menu\Programs\Administrative Tools
shell:管理工具 –%AppData%\ Microsoft \ Windows \开始菜单\程序\管理工具
shell:AppData – %AppData%
shell:AppData –%AppData%
shell:Application Shortcuts – %LocalAppData%\Microsoft\Windows\Application Shortcuts
shell:应用程序快捷方式 –%LocalAppData%\ Microsoft \ Windows \ Application快捷方式
shell:AppsFolder – Applications
shell:AppsFolder –应用程序
shell:AppUpdatesFolder – Installed Updates
shell:AppUpdatesFolder –已安装的更新
shell:Cache – %LocalAppData%\Microsoft\Windows\INetCache
shell:缓存 –%LocalAppData%\ Microsoft \ Windows \ INetCache
shell:Camera Roll – %UserProfile%\Pictures\Camera Roll
shell:相机胶卷 –%UserProfile%\ Pictures \相机胶卷
shell:CD Burning – %LocalAppData%\Microsoft\Windows\Burn\Burn
shell:CD刻录 –%LocalAppData%\ Microsoft \ Windows \ Burn \ Burn
shell:ChangeRemoveProgramsFolder – Control Panel\All Control Panel Items\Programs and Features
shell:ChangeRemoveProgramsFolder –控制面板\所有控制面板项目\程序和功能
shell:Common Administrative Tools – %ProgramData%\Microsoft\Windows\Start Menu\Programs\Administrative Tools
shell:通用管理工具 –%ProgramData%\ Microsoft \ Windows \“开始”菜单\程序\管理工具
shell:Common AppData – %ProgramData%
shell:通用AppData –%ProgramData%
shell:Common Desktop – %Public%\Desktop
shell:公用桌面 –%Public%\ Desktop
shell:Common Documents – %Public%\Documents
shell:公用文档 –%Public%\ Documents
shell:CommonDownloads – %Public%\Downloads
shell:常用下载–%Public%\ Downloads
shell:CommonMusic – %Public%\Music
shell:CommonMusic –%Public%\ Music
shell:CommonPictures – %Public%\Pictures
shell:CommonPictures –%Public%\ Pictures
shell:Common Programs – %ProgramData%\Microsoft\Windows\Start Menu\Programs
shell:通用程序 –%ProgramData%\ Microsoft \ Windows \“开始”菜单\程序
shell:CommonRingtones – %ProgramData%\Microsoft\Windows\Ringtones
shell:CommonRingtones –%ProgramData%\ Microsoft \ Windows \ Ringtones
shell:Common Start Menu – %ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup
shell:通用的开始菜单 –%ProgramData%\ Microsoft \ Windows \开始菜单\ Programs \ Startup
shell:Common Startup – %ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup
shell:通用启动 –%ProgramData%\ Microsoft \ Windows \开始菜单\ Programs \ Startup
shell:Common Templates – %ProgramData%\Microsoft\Windows\Templates
shell:通用模板 –%ProgramData%\ Microsoft \ Windows \ Templates
shell:CommonVideo – %Public%\Videos
外壳:CommonVideo –%Public%\ Videos
shell:ConflictFolder – Control Panel\All Control Panel Items\Sync Center\Conflicts
shell:冲突文件夹 –控制面板\所有控制面板项目\同步中心\冲突
shell:ConnectionsFolder – Control Panel\All Control Panel Items\Network Connections
shell:ConnectionsFolder –控制面板\所有控制面板项目\网络连接
shell:Contacts – %UserProfile%\Contacts
shell:联系人 –%UserProfile%\ Contacts
shell:ControlPanelFolder – Control Panel\All Control Panel Items
shell:ControlPanelFolder –控制面板\所有控制面板项目
shell:Cookies – %LocalAppData%\Microsoft\Windows\INetCookies
shell:Cookies –%LocalAppData%\ Microsoft \ Windows \ INetCookies
shell:Cookies\Low – %LocalAppData%\Microsoft\Windows\INetCookies\Low
shell:Cookies \ Low –%LocalAppData%\ Microsoft \ Windows \ INetCookies \ Low
shell:CredentialManager – %AppData%\Microsoft\Credentials
shell:CredentialManager –%AppData%\ Microsoft \ Credentials
shell:CryptoKeys – %AppData%\Microsoft\Crypto
shell:CryptoKeys –%AppData%\ Microsoft \ Crypto
shell:desktop – Desktop
shell:桌面 –桌面
shell:device Metadata Store – %ProgramData%\Microsoft\Windows\DeviceMetadataStore
shell:设备元数据存储 –%ProgramData%\ Microsoft \ Windows \ DeviceMetadataStore
shell:documentsLibrary – Libraries\Documents
shell:documentsLibrary –库\文档
shell:downloads – %UserProfile%\Downloads
shell:下载 –%UserProfile%\ Downloads
shell:dpapiKeys – %AppData%\Microsoft\Protect
shell:dpapiKeys –%AppData%\ Microsoft \ Protect
shell:Favorites – %UserProfile%\Favorites
shell:收藏夹 –%UserProfile%\收藏夹
shell:Fonts – %WinDir%\Fonts
shell:字体 –%WinDir%\ Fonts
shell:Games – Games
shell:游戏 –游戏
shell:GameTasks – %LocalAppData%\Microsoft\Windows\GameExplorer
shell:GameTasks –%LocalAppData%\ Microsoft \ Windows \ GameExplorer
shell:History – %LocalAppData%\Microsoft\Windows\History
shell:历史记录 –%LocalAppData%\ Microsoft \ Windows \ History
shell:HomeGroupCurrentUserFolder – Homegroup\(user-name)
shell:HomeGroupCurrentUserFolder –家庭组\(用户名)
shell:HomeGroupFolder – Homegroup
shell:家庭组文件夹 –家庭组
shell:ImplicitAppShortcuts – %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\ImplicitAppShortcuts
shell:ImplicitAppShortcuts –%AppData%\ Microsoft \ Internet Explorer \ Quick Launch \ User Pinned \ ImplicitAppShortcuts
shell:InternetFolder – Internet Explorer
shell:InternetFolder – Internet Explorer
shell:Libraries – Libraries
shell:图书馆 –图书馆
shell:Links – %UserProfile%\Links
shell:链接 –%UserProfile%\ Links
shell:Local AppData – %LocalAppData%
shell:本地AppData –%LocalAppData%
shell:LocalAppDataLow – %UserProfile%\AppData\LocalLow
shell:LocalAppDataLow –%UserProfile%\ AppData \ LocalLow
shell:MusicLibrary – Libraries\Music
shell:音乐库–图书馆\音乐
shell:MyComputerFolder – This PC
shell:MyComputerFolder –这台电脑
shell:My Music – %UserProfile%\Music
shell:我的音乐 –%UserProfile%\ Music
shell:My Pictures – %UserProfile%\Pictures
shell:我的图片 –%UserProfile%\ Pictures
shell:My Video – %UserProfile%\Videos
shell:我的视频 –%UserProfile%\ Videos
shell:NetHood – %AppData%\Microsoft\Windows\Network Shortcuts
shell:NetHood –%AppData%\ Microsoft \ Windows \ Network快捷方式
shell:NetworkPlacesFolder – Network
shell:NetworkPlacesFolder –网络
shell:OneDrive – OneDrive
外壳:OneDrive – OneDrive
shell:OneDriveCameraRoll – %UserProfile%\OneDrive\Pictures\Camera Roll
shell:OneDriveCameraRoll –%UserProfile%\ OneDrive \ Pictures \ Camera Roll
shell:OneDriveDocuments – %UserProfile%\OneDrive\Documents
shell:OneDriveDocuments –%UserProfile%\ OneDrive \ Documents
shell:OneDriveMusic – %UserProfile%\OneDrive\Music
shell:OneDriveMusic –%UserProfile%\ OneDrive \ Music
shell:OneDrivePictures – %UserProfile%\OneDrive\Pictures
shell:OneDrivePictures –%UserProfile%\ OneDrive \ Pictures
shell:Personal – %UserProfile%\Documents
shell:个人 –%UserProfile%\ Documents
shell:PicturesLibrary – Libraries\Pictures
shell:图片库–图书馆\图片
shell:PrintersFolder – All Control Panel Items\Printers
shell:打印机文件夹 –所有控制面板项目\打印机
shell:PrintHood – %AppData%\Microsoft\Windows\Printer Shortcuts
shell:PrintHood –%AppData%\ Microsoft \ Windows \ Printer快捷方式
shell:Profile – %UserProfile%
shell:个人资料 –%UserProfile%
shell:ProgramFiles – %ProgramFiles%
shell:ProgramFiles –%ProgramFiles%
shell:ProgramFilesCommon – %ProgramFiles%\Common Files
shell:ProgramFilesCommon –%ProgramFiles%\ Common文件
shell:ProgramFilesCommonX64 – %ProgramFiles%\Common Files (64-bit Windows only)
shell:ProgramFilesCommonX64 –%ProgramFiles%\ Common Files(仅限64位Windows)
shell:ProgramFilesCommonX86 – %ProgramFiles(x86)%\Common Files (64-bit Windows only)
shell:ProgramFilesCommonX86 –%ProgramFiles(x86)%\ Common Files(仅适用于64位Windows)
shell:ProgramFilesX64 – %ProgramFiles% (64-bit Windows only)
shell:ProgramFilesX64 –%ProgramFiles%(仅适用于64位Windows)
shell:ProgramFilesX86 – %ProgramFiles(x86)% (64-bit Windows only)
shell:ProgramFilesX86 –%ProgramFiles(x86)%(仅适用于64位Windows)
shell:Programs – %AppData%\Microsoft\Windows\Start Menu\Programs
shell:程序 –%AppData%\ Microsoft \ Windows \“开始”菜单\程序
shell:Public – %Public%
shell:公开 –%Public%
shell:PublicAccountPictures – %Public%\AccountPictures
shell:PublicAccountPictures –%Public%\ AccountPictures
shell:PublicGameTasks – %ProgramData%\Microsoft\Windows\GameExplorer
shell:PublicGameTasks –%ProgramData%\ Microsoft \ Windows \ GameExplorer
shell:PublicLibraries – %Public%\Libraries
shell:PublicLibraries –%Public%\ Libraries
shell:Quick Launch – %AppData%\Microsoft\Internet Explorer\Quick Launch
shell:快速启动 –%AppData%\ Microsoft \ Internet Explorer \快速启动
shell:Recent – %AppData%\Microsoft\Windows\Recent
shell:最近 –%AppData%\ Microsoft \ Windows \ Recent
shell:RecordedTVLibrary – Libraries\Recorded TV
shell:RecordedTVLibrary –图书馆\录制的电视
shell:RecycleBinFolder – Recycle Bin
shell:回收站文件夹 –回收站
shell:ResourceDir – %WinDir%\Resources
shell:ResourceDir –%WinDir%\ Resources
shell:Ringtones – %ProgramData%\Microsoft\Windows\Ringtones
shell:铃声 –%ProgramData%\ Microsoft \ Windows \ Ringtones
shell:Roamed Tile Images – %LocalAppData%\Microsoft\Windows\RoamedTileImages
shell:漫游平铺图像 –%LocalAppData%\ Microsoft \ Windows \ RoamedTileImages
shell:Roaming Tiles – %AppData%\Microsoft\Windows\RoamingTiles
shell:漫游磁贴–%AppData%\ Microsoft \ Windows \ RoamingTiles
shell:SavedGames – %UserProfile%\Saved Games
shell:SavedGames –%UserProfile%\ Saved Games
shell:Screenshots – %UserProfile%\Pictures\Screenshots
shell:截屏 –%UserProfile%\ Pictures \ Screenshots
shell:Searches – %UserProfile%\Searches
shell:搜索 -%UserProfile%\ Searches
shell:SearchHistoryFolder – %LocalAppData%\Microsoft\Windows\ConnectedSearch\History
shell:SearchHistoryFolder –%LocalAppData%\ Microsoft \ Windows \ ConnectedSearch \ History
shell:SearchHomeFolder – search-ms:
shell:SearchHomeFolder – search-ms:
shell:SearchTemplatesFolder – %LocalAppData%\Microsoft\Windows\ConnectedSearch\Templates
shell:SearchTemplatesFolder –%LocalAppData%\ Microsoft \ Windows \ ConnectedSearch \ Templates
shell:SendTo – %AppData%\Microsoft\Windows\SendTo
shell:SendTo –%AppData%\ Microsoft \ Windows \ SendTo
shell:Start Menu – %AppData%\Microsoft\Windows\Start Menu
shell:“开始”菜单 –%AppData%\ Microsoft \ Windows \“开始”菜单
shell:StartMenuAllPrograms – StartMenuAllPrograms
shell:StartMenuAllPrograms – StartMenuAllPrograms
shell:Startup – %AppData%\Microsoft\Windows\Start Menu\Programs\Startup
shell:启动 –%AppData%\ Microsoft \ Windows \开始菜单\程序\启动
shell:SyncCenterFolder – Control Panel\All Control Panel Items\Sync Center
shell:SyncCenterFolder –控制面板\所有控制面板项目\同步中心
shell:SyncResultsFolder – Control Panel\All Control Panel Items\Sync Center\Sync Results
shell:SyncResultsFolder –控制面板\所有控制面板项目\同步中心\同步结果
shell:SyncSetupFolder – Control Panel\All Control Panel Items\Sync Center\Sync Setup
shell:SyncSetupFolder –控制面板\所有控制面板项目\同步中心\同步设置
shell:System – %WinDir%\System32
shell:系统 –%WinDir%\ System32
shell:SystemCertificates – %AppData%\Microsoft\SystemCertificates
shell:SystemCertificates –%AppData%\ Microsoft \ SystemCertificates
shell:SystemX86 – %WinDir%\SysWOW64
shell:SystemX86 –%WinDir%\ SysWOW64
shell:Templates – %AppData%\Microsoft\Windows\Templates
shell:模板 –%AppData%\ Microsoft \ Windows \ Templates
shell:ThisPCDesktopFolder – Desktop
shell:ThisPCDesktopFolder –桌面
shell:UsersFilesFolder – %UserProfile%
shell:UsersFilesFolder –%UserProfile%
shell:User Pinned – %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned
shell:用户固定 –%AppData%\ Microsoft \ Internet Explorer \ Quick Launch \ User Pinned
shell:UserProfiles – %HomeDrive%\Users
shell:UserProfiles –%HomeDrive%\ Users
shell:UserProgramFiles – %LocalAppData%\Programs
shell:UserProgramFiles –%LocalAppData%\ Programs
shell:UserProgramFilesCommon – %LocalAppData%\Programs\Common
shell:UserProgramFilesCommon –%LocalAppData%\ Programs \ Common
shell:UsersLibrariesFolder – Libraries
shell:UsersLibrariesFolder –库
shell:VideosLibrary – Libraries\Videos
shell:视频库–图书馆\视频
shell:Windows – %WinDir%
shell:Windows –%WinDir%
And there you go. Of course, once you find these folders, you can easily bookmark them so you can get to them even quicker in the future. But, if you’re a keyboard person, it might be worth adding some of these to your repertoire.
然后你去。 当然,一旦找到这些文件夹,便可以轻松地为它们添加书签,以便将来更快地访问它们。 但是,如果您是键盘手,则可能需要将其中一些添加到您的曲目中。
翻译自: https://www.howtogeek.com/257715/how-to-open-hidden-system-folders-with-windos-shell-command/
shell打开文件夹命令
-
Shell数组操作(添加、删除元素、清空、遍历)
2021-10-27 14:54:45# 添加 arr[0]="111" arr[1]="222" # 整体打印 echo ${arr[@]} # 遍历, 注意下标从0开始 for (( i=0;i<${#arr[@]};i++ )) do echo ${arr[$i]} done # 删除某元素, 如果删除0,那么遍历只能从1开始了 unset...#!/bin/sh # 声明 arr=() # 添加 arr[0]="111" arr[1]="222" # 整体打印 echo ${arr[@]} # 遍历, 注意下标从0开始 for (( i=0;i<${#arr[@]};i++ )) do echo ${arr[$i]} done # 删除某元素, 如果删除0,那么遍历只能从1开始了 unset arr[0] # 查看数组长度 echo ${#arr[@]} # 清空数组 unset arr echo ${arr[@]} # 再次赋值 arr[0]="333" echo $arr
-
shell 数组添加方法
2019-04-26 13:46:09向Shell数组添加元素有多种方法,每种方法在使用时都有一些需要注意的地方,没有见过这方面的总结资料,所以自己总结一下。 直接下标添加 array_name[index]=value 最简单的添加方式,直接用下标index为数组元素...array_name[@]表示数组大小
向Shell数组添加元素有多种方法,每种方法在使用时都有一些需要注意的地方,没有见过这方面的总结资料,所以自己总结一下。
直接下标添加array_name[index]=value
最简单的添加方式,直接用下标index为数组元素赋值,在使用时需要注意的是就是需要确保下标index处原本是没有值的,否则会替换index处原本的值。
数组长度添加array_name[${#array_name[@]}]=value
#或array_name[${#array_name[*]}]=value以数组长度为下标添加,每次只能增加一个元素。但此方法有一个前提,就是数组中的元素下标必须是连续的,否则会存在替换已有元素的风险。例如:
arr=([1]="a" [2]="b")
echo ${arr[@]}
arr[${#arr[@]}]="c"
echo ${arr[@]}实际上并有添加元素,而是将下标为2的元素值“b”替换为了“c”。
重新创建数组array_name=("${array_name[@]}" value1 ... valueN)
-
linux shell 数组添加元素
2020-03-26 09:23:07向Shell数组添加元素有多种方法,每种方法在使用时都有一些需要注意的地方,没有见过这方面的总结资料,所以自己总结一下。 直接下标添加 array_name[index]=value 最简单的添加方式,直接用下标index为数组元素... -
Shell数组添加元素注意事项
2019-02-12 20:16:24数组添加元素注意事项总结 -
Shell脚本批量添加CSV数据到MySQL
2015-07-23 15:05:39使用一般的mysql命令或者是sql脚本都可以插入数据到mysql数据表中,我这里介绍如何是Shell批量的从CSV文件中添加数据到mysql数据库中,方便数据迁徙,测试数据的添加之类的工作。 -
在浏览器中打开shell,连接linux
2022-04-19 22:00:26这个项目可以在浏览器上打开 shell 页面,连接linux,可以输入 shell 命令,支持文件上传和下载。 功能 服务器基本信息统一查看 通过浏览器打开服务器shell 文件上传到服务器,或从服务器下载文件 集成服务器资源... -
使用shell脚本添加环境变量
2020-03-31 22:52:05最近一个项目中需要用shell脚本来添加环境变量,然后使用java代码读取,尝试了几次才实现我想要的效果,在此记录下来,以备后用: #!/bin/bash hadoop_version=2.7.2 echo "export HADOOP_VERSION=${hadoop_version}... -
linux下利用shell在指定的行添加内容的方法
2021-05-15 07:16:55linux下利用shell在指定的行添加内容的方法在linux的一些配置中总会要进行某个文件中的某行的操作,进行增加,修改,删除等操作。而这里主要是进行的是指定的行添加数据的操作:脚本如下:sed -i '3i asdf 1.sh' 1.... -
如何在Windows命令行中打开Python自带shell
2020-09-20 12:44:19不知道大家有没有过困扰,就是该如何在windows自带的命令行中打开python自带的shell(编译器),今天研究了以下...然而这种方法打开的自带shell存在问题,就是只能够使用python本身自带的模块,用户自己添加的模块并不能 -
Linux Shell 添加/修改 环境变量的4种方式
2022-01-29 17:39:38方式 优点 备注 .bash_profile 打开(或者登录shell)后自动生效。对所有shell进程生效 ...仅对当前shell有效,子进程和新打开的shell均无效 无 ENV_NAME=ENV_VALUE command options 仅对当前命令... -
如何在shell脚本中快速的添加crontab任务
2021-09-10 18:17:53在编写shell脚本时,经常会遇到需要编辑crontab任务的场景。下面介绍一下如何快速的编辑crontab。 一、使用crontab命令加载定时任务配置 # crontab -l > crontab_test # echo "* * * * * echo hello" >... -
020_shell添加用户组
2020-05-11 17:31:13#设计一个shell程序,添加一个新组为class1,然后添加属于这个组的30个用户,用户名的形式为stdxx,其中xx从01到30。 #请 su root 或者 sudo su 变成root用户 groupadd class1 for i in {9901..9930}; do xx=`echo... -
linux shell脚本批量添加用户
2019-02-20 12:26:27有事有需求要批量添加用户所以写了个脚本 从user.list中读取数据每一行就是一个用户名 #!/bin/bash for username in $(more user.list) do if [ -n $username ] then echo $username useradd -m $username echo ... -
使用shell脚本或命令行添加crontab定时任务
2021-12-10 19:52:59一般情况下在有新的定时任务要执行时,使用crontab -e ,将打开一个vi编辑界面,配置好后保存退出,但是在自动化运维的过程中往往需要使用shell脚本或命令自动添加定时任务。接下来结束三种(Centos)自动添加的... -
mac 使用shell脚本实现快捷命令打开文件
2019-08-27 15:59:09每次进入某个远程管理平台,总是要写很长的命令行。 是否可以设置快捷命令方式呢?...先创建shell脚本 vopen, 通过条件判断处理 #!/bin/bash # comment NAME=$1 if [[ $NAME == blj ]] then # 执行命令1 ... -
利用shell脚本添加环境变量
2020-09-14 19:47:27在脚本中export的环境变量无法导入当前shell环境。因为执行脚本的时候会启动一个子shell环境。执行完毕,子shell退出。 可以使用source xxx.sh 或者 . xxx.sh的方式设置当前shell的环境变量 ... -
efi shell 添加启动项 修复启动
2020-12-24 07:01:08efishell添加启动项修复启动(2013-03-01 19:12:33)标签:娱乐style="font-size:14px;">新买的板子就有问题,换货要一周。等不及先在问题板上把os都倒腾好,想着反正换板子又不换硬盘,没啥大不了的,孰知问题就出... -
给自己写的shell脚本添加 --help帮助选项
2020-10-01 21:36:07给自己写的shell脚本添加 --help帮助选项 经常会写一些小的shell脚本工具,给别人使用的时候别人不知道如何使用,怎么添加参数,这个时候你可以给你自己的shell脚本添加一个 --help 参数来提示使用者如何使用(就像... -
linux shell sed 添加空行
2020-03-25 09:23:07一、每行前后添加空行 1.每行后面添加一行空行: sedGtmp 每行前面添加一行空行: sed'{x;p;x;}'tmp 2.每行后面添加两行空行: sed'G;G'tmp 每行前面添加两行空行: sed'{x;p;x;x;p;x;}'tmp 3.每行后面... -
linux下开启Shell命令
2021-05-16 19:39:20进入 linux下ifconfig、shutdown等命令无法使用_开启Shell命令 Java代码 为什么在 RedHat Linux 5 下不能使用 ifconfig 命令 我安装完 RedHat Linux 5 之后,在终端使用一些命令,如: ifcinfig 查看本机欢迎进入... -
Linux在指定文件指定行插入内容shell脚本
2016-01-20 10:29:40Linux在指定文件指定行插入内容shell脚本,参数请见脚本注释 -
一个shell脚本来打开pycharm软件
2020-12-22 18:15:53第一步在ubuntu16.04上安装pycharm,具体参见其它博文,度娘上搜“ubuntu安装pycharm”教程比较多第二步安装好pycharm后打开软件还是比较复杂的执行以下两条shell指令,1:cd ...../bin(找到pycharm 安装目录bin下);... -
HBase shell 创建表及添加数据
2020-06-17 19:53:58HBase shell 命令创建表,表名hbase_test,HBase表是由Key-Value组成的,下面给出一个hbase表的格式,方便小伙伴们理解 此表有两个列族,列族1和列族2,其中列族1和列族2下分别有两个列name和age,phone和address ... -
Android系统添加开机自动启动执行的shell脚本
2020-12-31 23:55:13sys.boot_completed=1 start upbridge #当权限不足时,添加权限 chown root shell /system/bin/upbridge.sh chmod 0550 /system/bin/upbridge.sh 将该脚本从编译路径下拷贝到生成系统文件的指定路径下 device/qcom/... -
# 给shell脚本添加执行权限
2019-11-14 20:02:02给shell脚本添加执行权限 例如脚本名字为tomcat.sh,执行命令: chmod 777 tomcat.sh -
Linux 添加文本到指定行/在文件的指定行添加内容(shell, sed)
2020-01-24 18:11:58#shell如何添加文本到指定行 #sed 插入文本 用sed来插入文本到指定行。 基本语法 只是在屏幕输出/打印中显示更改,并不改变文件本身内容 sed '作用范围行 插入行前/行后 插入内容' 文件名 # 中间的空格也可省略 ... -
【shell】添加文本到文件的第一行和最后一行
2020-05-01 23:28:29sed -i '1i添加的内容' filename # 在第一行前添加字符串 sed -i '$i添加的内容' filename # 在最后一行行前添加字符串 sed -i '$a添加的内容' filename # 在最后一行行后添加字符串 ... -
Linux Shell批量给文件添加后缀的方法
2021-01-19 15:49:15给目录A及其子目录下的文件增加后缀.old # find A -type f -exec mv '{}' '{}'.old \; 实战,给当前目录下的所有压缩文件添加后缀.7z find . -type f -exec mv '{}' '{}'.7z \;