# Tag Info

0

According to the tutorial on http://www.winbeta.org/news/open-command-prompt-specific-windows-10-file-directory, you can just open the directory you want through Explorer, then in the File dropdown menu you'll find an option to open a command window in that location. From the comments, you should also be able to Shift + Right Click a directory icon, and ...

0

Taken from another SE site: Alt + SysRq + B is instant reboot, and Alt + SysRq + O is instant shutdown. Credit goes to original author. Sharing only for reference.

2

This question is old, but since I stumbled on it while looking for a way to grep only part of a line, here goes: A workaround is to enable the option 'only-matching' and then to use RegExp's power to grep a bit more than your text: grep -o ".\{0,50\}WHAT_I_M_SEARCHING.\{0,50\}" ./filepath Of course, if you use color highlighting, you can always grep ...

0

Problem Solved! Originally, i had performed a Cut + Paste operation to move all of the files and folders from the D drive to my C drive. I had gotten a few errors for a few files that said that i can't move these files because the length of filenames was too long. I was going through each folder that remained and deleting them after getting the files out ...

2

Alternatively you can try https://github.com/minio/mc mc provides minimal tools to work with Amazon S3 compatible cloud storage and filesystems. It has features like resumable uploads, progress bar, parallel copy. mc is written in Golang and released under Apache license v2.

0

You should have a telnet daemon configured for listening on that port. ;-))) (if you want to test it with telnet)

1

Just use alt+[left/right] arrow insted :).

2

How to use wmic to kill a cmd.exe instance searching by it's command line? It seems that you can do this natively from Windows batch with the below format. Just plug in your batch file name (which is the string found with WMIC COMMANDLINE option) in the %start.bat% part as I did below—I used start.bat in my example below just as you used in your ...

1

I used this to solve a similar problem. Under your batch action I set it up as the following and it worked fine for me. Program/script: path to python, e.g., C:\Python27\ArcGIS10.2\python.exe Add Arguments (optional): script name, e.g., scrape.py Start in (optional): path to script, e.g., C:\Users\handsome\Documents\PYTHON\Code

1

try find /home/app/myapp.com/app/tmp/cache $$-name graphs -prune$$ -o -type f -delete where $$-name graphs -prune$$ tells find to skip graphs -o -type f -delete or else, delete files.

1

A good and reliable way to check for ports opened is using ss (replacement for the deprecated netstat), it's usable in a script without requiring elevated privileges (i.e. sudo). Usage: option -l for listening ports, option -n to bypass DNS resolution, and the filter on source port NN: src :NN (replace NN by the port you want to monitor). For more options, ...

1

If you store the CMD file on the USB drive and run it from there, then you can use the working directory of the script to help you out. Contents of CopyAppdataHere.cmd: xcopy /y /s %appdata% %~dp0SomeFolder In the script, %~dp0 expands to the drive and the path of the CMD file (including the trailing backslash), even if it's not the active current ...

1

You'll probably want to add this to your .bashrc or .bash_aliases. # load git completions _completion_loader git # assign git's completion function _git to gi complete -o bashdefault -o default -o nospace -F _git gi Alternatively you can use the following (which is pretty much equivalent): # load git completions . ...

0

Here is a batch file. I'm using cp command's backup feature. Program can be found under the \usr\local\wbin folder of this zipped file (UnxUtils project). Extract the executable in any folder in your %PATH%. @echo off setlocal EnableDelayedExpansion rem Set VERSION_CONTROL variable, read by `cp' *nix command set VERSION_CONTROL=t rem Define origin and ...

-1

use below command to get local admin users wmic -U domain/user //ip "SELECT * FROM Win32_GroupUser"| awk -F'"' '{print $4 " : "$8}'|grep -i Administrators|awk -F':' '{print $2}' 5 You do not need to copy all the directory files included, you should copy only the tree structure with the command xcopy SourceDir DestinationDir /T /E where /e Copies all subdirectories, even if they are empty. Use /e with the /s and /t command-line options. /t Copies the subdirectory structure (that is, the tree) only, not files. To ... 0 I know this is two years too late for the OP, but by following the OSDev Wiki on installing GRUB2 on Mac OS X, I was able to get grub-mkrescue (and other GRUB related tools for my target platform) installed after installing the proper build tools for the target platform. To get the build tools, I used a Homebrew tap, but at its root, Homebrew is just a pile ... 0 Use ROBOCOPY if you're creating backup scripts. xcopy has been deprecated and will likely be phased out of use in the near future. robocopy can do everything xcopy can. It is also more flexible and reliable. Creating scripts with robocopy will future-proof them. Use robocopy to easily copy folders. The robocopy command replaces the xcopy command. It can ... 0 I have just realized the tool has a standalone version installer which is called SQL Server® Data-Tier Application Framework, it requires Microsoft SQL Server System CLR Types, and Microsoft SQL Server Transact-SQL ScriptDom. For latest download link(Version 2014): Microsoft® SQL Server® Data-Tier Application Framework Other two required components can be ... 0 I assume you need "paste" image to program. You can simulate Windows Explorer copy command with CopyQ. After download and run CopyQ, type this command: copyq.exe copy text/uri-list file:///C:/testdir/file.png C:/testdir/file.png - path to image. Should be used forward slash / Also you can give directly full path file.png to program. "C:\Program ... 1 Your problem is command prompt does not know anything about spaces in file names. it thinks your exe name is FLTK and testing as a paramter to your application. if you try "FLTK Testing.exe" with quotes as written it will probably run. but i suggest that renaming your exe without spaces for easy access. also if you press F and Tab probably command prompt ... 0 Lets say, you create a batch file called test.cmd, and you place the following text in it, the output will be as follows: @echo off echo %0 echo %cd% set currentpath=%0 ::remove any " if present set currentpath=%currentpath:"=% :: remove last 9 characters set currentpath=%currentpath:~0,-9% :: add quotes back set currentpath="%currentpath%" echo ... 0 Without modifying the current shell setting it's possible to execute each of the Cyrus proposal in a subshell (GLOBIGNORE="readme.md:contrib.rst:licence.txt" ; cat *) as well as (shopt -s extglob; cat !(readme.md|contrib.rst|licence.txt)) 3 Try this with bash's extended pattern matching feature: shopt -s extglob cat !(readme.md|contrib.rst|licence.txt) 2 Try this with bash: GLOBIGNORE="readme.md:contrib.rst:licence.txt" cat * unset GLOBIGNORE 1 What did you already try? Are it always the same files which you want to skip. In that case you could hardcode them in a command. E.g. something like find ! -name readme.md -o ! -name contrib.rst -o ! -name licence.txt -exec cat {} \+ Now if you want something which skips all files larger than 4 lines without knowing the file names beforehand then the ... 0 To answer this part: And this outputs the full directory, including the file name. So my first problem is getting rid of the file name. In a batch file you can do @echo off :: locate 'myScripts.bat' and save its directory to 'myDir' :: in case of multiple matches 'myDir' will be set to the last one set "myDir=" for /f "delims=" %%x in ('dir /b /s ... 0 There are a number of methods. The first method which would be easiest would be: if exist=D:\Data\Teat.TXT goto :copy Just run down the tree until it finds the letter assigned to your USB. Another method would be at the start of your Batch have a menu option where you input the letter of the USB and assign it a variable, this will then be used in the ... 1 Your assumed destination is the folder holding your command file. The following simply tell it where to get stuff from. copy %appdata%*.* or copy c:\download if your batch is in usb X:\123 = this is where the copies files will go. 0 If you are previously on the target directory: luna:/tmp % mkdir -p a/b/c/d luna:/tmp % pwd /tmp luna:/tmp % cd a/b/c/d luna:d % pwd /tmp/a/b/c/d luna:d % cd - luna:/tmp % pwd /tmp luna:/tmp % 0 A simple, low-tech solution that doesn't need any setup. Only works in shells with bash-style command editing, though. Type cd .. Press Up-arrow Return as many times as needed. Very fast if you use two fingers. 1 In Linux works like this are made with the might du. It exists a du.exe for windows downloadable from the microsoft technet. On many places on the net you can find examples of powershell scripts that you can easily modify for your purpose, such the following one:$startFolder = Read-Host "Enter directory" $colItems = (Get-ChildItem$startFolder -recurse | ...

0

My script resides in FolderB and I want to find a folder with a specific name (FolderC) that resides in FolderA alongside FolderB First you need to find the directory that your script is in. Then, you need to go up one directory and look for FolderB: dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) folderc="$dir/../FolderC" Answer for ...

0

Use the absolute path instead of the relative one. Instead of ~/... Use /home/... (or C:/... for Windows). This avoids the difficultly in finding the file relative to your location.

2

Start elevated Command Prompt. Get NIC list and index number: wmic nic get name, index Enable NIC with index number: (eg: 7) wmic path win32_networkadapter where index=7 call enable Disable NIC with index number: (eg: 7) wmic path win32_networkadapter where index=7 call disable

0

It is doing what you asked it to do, reading its input and extracting "bar" strings from it. I'm not sure why you couldn't exit with control-C. That works for me.

1

By using trial and error method, I found that the following line serve my purpose: md data\rs1 data\rs2 data\rs3 To convert from unix command, remove the first / and replace rest / to \.

0

so to add a task that do cd we can create a new tasks and then put in there: -cur_console:d:C:\

0

You could run a cron task which is scheduled "frequently" (whether once a minute or hour depends on what you need). In the task, you could then make those checks, and go ahead and run it when the conditions are met. If this is a one-time task, your task could (since it runs with your permissions) update the crontab to remove itself.

0

The main idea For any modern rsync it's possible to use --info instead of -v, e.g: rsync --info=COPY2,DEL2,NAME2,BACKUP2,REMOVE2,SKIP2 -a source/ dest/ > log.txt # or eventually with --log-file=mylog.txt Some additional operations The resulting output/file will be similar to file1.zip is uptodate file2.odt Dir1/ Dir1/file3.txt Then you can use ...

2

Use --log-file option. rsync -av /source/ /dest/ --log-file=mylog.log

1

Your $PATH contains either ./ or the parent directory of src and srptool. Bash auto-completion completes commands found in your$PATH, so if ./ is in there and your current working directory contains executables, hitting Tab inside it will make Bash expand the name of whatever executables are in it.

0

Here is a Windows batch script for this. This first script will move the files only within the directory structure similar to the one shown in the OP question. Edit the value of the script variable "topfolder" to contain the "base folder" for the directory structure. Edit the value of the script variable "subfolderprefix" to contain the common prefix for ...

1

The link count is basically the number of places the file or directory is used. When it goes to zero, the file or directory is removed. Every file in a directory uses that directory, and a directory cannot be removed so long as there are files in it.

1

You probably don't need to be using the START command. The reason I typically find the START command may be quite useful is for running a program in the background, which may not be the desired action if you're trying to see results. Just make a new text file that says: @Echo Off C:\Users\delta\dc2.exe -configure="C:\Users\delta\Switch.xml" pause Make ...

0

Any ideas on where I am going wrong? START cmd.exe /k "C:\Users\delta\dc2.exe -configure="C:\Users\delta\Switch.xml"" Your start command is wrong. The first argument should be the title of the command (it is not optional). Try: START "my command title" "C:\Users\delta\dc2.exe" -configure=C:\Users\delta\Switch.xml or START "" "C:\Users\delta\dc2.exe" ...

0

It's been awhile since I've used OS X but in the past you could get at the cookies via deleting the files within the app itself. Have you poked around in Safari.app directory? Find the local storage in there and delete the directory you were removing before, and start Safari.

0

In Win8.1 hit the Windows-button and type "Windows SDK 7.1 Co..." (you are searching for it) until you see "Windows SDK 7.1 Command prompt" in the menu to the right. Right-click on it and choose "Run as administrator"

-1

i think You can Use like msg*your file is going to delete pause del/s /q "C:\Users\Rd\Desktop\New folder (2)\" rmdir /s /q "C:\Users\Rd\Desktop\New folder (2)\" mkdir "C:\Users\Rd\Desktop\New folder (2)"

0

ls -l should do the work. Example: #> ls -l /home/TEST/ total 16 -rw-r--r-- 1 rfmas1 nms 949 Nov 16 12:21 create_nd_lists.py -rw-r--r-- 1 rfmas1 nms 0 Nov 16 12:35 enb_list -rw-r--r-- 1 rfmas1 nms 0 Nov 16 12:35 nb_list -rw-r--r-- 1 rfmas1 nms 0 Nov 16 12:35 nodes_ip.txt -rw-r--r-- 1 ...

Top 50 recent answers are included