As the title says.I would like a script that tells windows that the next boot should be into safe mode or atleast that the "F8" menu should be presented next boot.Booting into WinRE(Launch startup repair...) is problably even more un-doable.I looked over bcdedit options but did'nt see anything like this.I know msconfig has an option for safe boot but it's gui only.
Currently if i wan't to boot into safe mode or launch WinRE then i have to forcefully restart my pc first for those options to be presented during boot(F8 does not bring up the safe mode option under normal conditions).
Im using Windows 7 x64.
I have seen how simple it is for Mac OS to generate pdf from a document without additional software to install.
But I am looking for this functionality in Linux.
One scenario, for example, if I have myDocument.txt that contain an article, how can I convert this into pdf? My next question is, assuming that myDocument.txt is a 3-paged document, will it generate a 3-page continuous pdf and not just 3 separate pdfs?
Any tools for linux that does this? (GUI is fine, but commandline is preferable)
So apparently, CentOS decided I was Dutch, and thus, should not have a English locale.
Apart from the fact that this greatly bothers me, I am having a pretty hard time actually changing it back. There does not seem to be a setlocale function, and system-config-language tells me I am using an English locale, even though my environment says otherwise.
Any help would be appreciated.
Output from locale:
LANG=nl_NL.UTF-8
LC_CTYPE="nl_NL.UTF-8"
LC_NUMERIC="nl_NL.UTF-8"
LC_TIME="nl_NL.UTF-8"
LC_COLLATE="nl_NL.UTF-8"
LC_MONETARY="nl_NL.UTF-8"
LC_MESSAGES="nl_NL.UTF-8"
LC_PAPER="nl_NL.UTF-8"
LC_NAME="nl_NL.UTF-8"
LC_ADDRESS="nl_NL.UTF-8"
LC_TELEPHONE="nl_NL.UTF-8"
LC_MEASUREMENT="nl_NL.UTF-8"
LC_IDENTIFICATION="nl_NL.UTF-8"
LC_ALL=
Both my ~/.bashrc as ~/.bash_profile contain no locale settings. Additionally, /etc/bashrc does not contain any locale references either.
I am working on an auto-install script for where I work and we have a ClickOnce type application we use from a vendor. I have looked into it and we can't automate the install but we would like to be able to at least start the install automatically.
I have tried
rundll32.exe dfshim.dll,ShOpenVerbApplication "%SOFTWARE%\ToolsApp.application"
but it gives me an error about an invalid URI.
What would probably be the easiest is to use whatever program Windows has (Windows XP in our case) to run the default "handler" for the file. I don't know if any such thing exists, but that is what comes to mind.
For example:
I'm in the directory:
F:\Data
Inside this directory, I have four directories:
F:\Datadir
22179 22915 23459 23460
These directories have various content, including directories and files.
I'm trying to run something like:
rmdir /s *\*
where I delete all the contents of these numbered directories, while leaving the empty directories. Is there a one-liner that can do this, or do I have to loop through the sub-directories?
I'm looking for some software for my OpenSUSE, which with I would be able to organize my audio files.
I've found one, which may be good, but it's unable to run without X server (in CLI).
http://musicbrainz.org/doc/MusicBrainz_Picard
I'm not looking for ID3 renamers. There're maybe hundreds of them... I'm looking for software, which has its own database, or is able to communicate with some database, like CDDB, Gracenote, last.fm etc.
Given this example folder structure:
/folder1/file1.txt
/folder1/file2.djd
/folder2/file3.txt
/folder2/file2.fha
How do I do a recursive text search on all *.txt files with grep from "/"?
("grep -r <pattern> *.txt" fails when run from "/", since there are no .txt files in that folder.)
My bash scripting knowledge is very weak that's why I'm asking help here. What is the most effective bash script according to performance to find and copy files from one LINUX server to another using specifications described below.
I need to get a bash script which finds only new files created in server A in directories with name "Z" between interval from 0 to 10 minutes ago. Then transfer them to server B. I think it can be done by formatting a query and executing it for each founded new file "scp /X/Y.../Z/file root@hostname:/X/Y.../Z/" If script finds no such remote path on server B it will continue copying second file which directory exists. File should be copied with permissions, group, owner and creation time.
X/Y... are various directories path. I want setup a cron job to execute this script every 10 minutes. So the performance is very important in this case.
Thank you.
I am trying to get the values from a file which has duplilcates also. But while setting the values in environmental variable SET, it is not considering the duplicate values. I am using below code:
for /f "tokens=1,2 delims=@" %%a in (test.txt) do (
set size=............%%b
call set %%size:~-12%%=%%a
)
for /f %%a in ('set .') do >>outfile.txt echo %%a
Format of test.txt:
"C\ab"@12345678
"C\ab\we"@345678905
"C\ad\df"@345678905
I have two .rtf file....
The first one have this content:
Apple, Orange, Banana, Noodle, Chip
The Second File is something like this:
Apple I love eat Apple.
Banana I hate Banana.
Zoo I want to go Zoo.
Noodle Noodle can be a very very very very very very very very very very very long, but still is one line.
Chip Don't eat so many chip.
Orange Orange is great, not Apple plx. Noodle
Water Drinking water is boring.
The first file is a "key" of second file. In the second file, the first word is the key of each line. Each key and sentence in second file ONLY have one line. The Second File have many lines with key, but not all the key is shown on file1, but file1's key MUST in the second file.
How can I get the result like this: (Need to sort by the key from File1)
Apple, Apple I love eat Apple.
Orange, Orange is great, not Apple plx.
Banana, I hate Banana.
Noodle, can be a very very very very very very very very very very very long, but still is one sentence.
Chip, Don't eat so many chip.
is there anyway to convince mput to send all sub directories of the current directory to the server. Im trying to write a script to automatically update a website when it is run. So far ive been trying
mput *
but that only sends the files in the current directory.
Any help would be appreciated.
during antivirus installation this error required"an installation on a server system othis product is not possible. the setup willbe cancled." what should i do to install it
I have a folder named "C:\Jobs\job#1" , "C:\Jobs\job#2" "C:\Jobs\job#3" etc and a lot of directories and sub-directories under it.
I want to get the all the directories under Jobs and xcopy them to C:\backup.
Then I want to xcopy all the files under each Job#1, 2 ,3 etc. to C:\backup\job#1\month\\*.*
To make it clearer.
Source dir = C:\Jobs\job#1\"myfiles&dir"
Destination dir = C:\Backup\job#1\month\"myfiles&dir"
then do the next folder
Source dir = C:\Jobs\job#2\"myfiles&dir"
Destination dir = C:\Backup\job#2\month\"myfiles&dir"
...until all folders are back-up. Since the job folder keep increasing, by doing it this way I don't have to add extra code on this script except modify the month. Thank you.
I have a Ubuntu Server VPS and I want to use /bin/bash/ as my shell. How can I change my shell? I have root access but I don't work as root. So dash is my default shell now.
I have read How do I make Bash my default shell on Ubuntu? and chsh seams to be the preferred way to go. But when I type chsh /bin/bash I get this message:
chsh: unknown user /bin/bash
And if I just type /bin/bash the Bash shell seams to work fine. How to change it?
Attempting to end up with something similar to this:
$ ls -l
lrwxrwxrwx 1 user group 4 Jun 28 2010 foo -> /home/bar
lrwxrwxrwx 1 user group 4 Jun 29 2010 foo -> /etc/bar
The intention is to be able to move a file to foo & have it go to both destination directories for now. The goal is to eventually unlink /home/bar link after confirming there are no issues with moving the files to /etc/bar. I am restricted in that I am unable to change or add to the process that moves the files.
I'm having problems with iptables. I am trying to block port 80 from the outside, basically plan is we just need to Tunnel via SSH then we can get on the GUI etc. on a server
I have this in my rule:
Chain OUTPUT (policy ACCEPT 28145 packets, 14M bytes)
pkts bytes target prot opt in out source destination
0 0 DROP tcp -- * eth1 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 state NEW,ESTABLISHED
And
Chain INPUT (policy DROP 41 packets, 6041 bytes)
0 0 DROP tcp -- eth1 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 state NEW,ESTABLISHED
Any guys wanna share some insights?
I can get it to read the text file until it becomes a comma delimited text file.
I would like to read the two variables on each line and test each one with a If statement for another condition. Problem is I can't read the variables properly. Tried many things but here is what I will post. Timeouts are to see what's happening:
for /f "tokens=*" %%a in (TestText.txt) do (
timeout /t 1
echo %%a is the present variabe
timeout /t 2
if %%a=="One","1" echo Match for "One","1"
timeout /t 3
if %%a=="One""1" echo Match for "One","1"
timeout /t 4
if %%a=="One" echo Match for "One"
timeout /t 5
if %%a=="1" echo Match for "1"
timeout /t 6
)
TestText.txt
"One","1"
"Two","2"
"Three","3"
"Four","4"
OUTPUT:
"One","1" is the present variabe
I want to delete some files/directories from my Time Machine Partition using rm, but am unable to do so. I'm pretty sure the problem is related to some sort of access control extended attributes on files in the backup, but do not know how to override/disable them in order to get rm to work. An example of the error I'm getting is:
% sudo rm -rf Backups.backupdb/MacBook/Latest/MacBook/somedir
rm: Backups.backupdb/MacBook/Latest/MacBook/somedir: Directory not empty
rm: Backups.backupdb/MacBook/Latest/MacBook/somedir/somefile: Operation not permitted
There are a number of reasons I do not want to use either the Time Machine GUI or Finder for this. If possible, I'd like to be able to maintain the extended protection for all other files (I'd like not to disable them globally, unless I can re-enable once I've done my work).
I'm trying to setup rsync to backup a remote directory to my local drive.
I cd to the directory that I want to pull the files to, then I enter:
rsync -vrtW [email protected]:~/public_html
I enter the password then it starts running. I get all the files listed, but none of them actually transfer. What am I missing?
Thanks
What I want to do is have a batch file search folders, and subfolders, for matching file names that are ending in .mp3 and .wma and delete or move the *.wma duplicates.
Below you'll find what I have come up with until now, I know it is wrong for at least two reasons. I have searched the internet, and tried a number of things, but now I am stuck. Can anyone please help me with this?
for /r %%f in "(%userprofile%\my music\* - ?.*)" do del "%%f" /s/p