Is there a way by which I can read RSS feeds from the terminal itself ? Something that would display the titles and a link to follow. Or maybe a software which works from within the terminal.
Platform: CentOS 6.2 Shell:tcsh
I'm playing around with cd for a BASH script, and noticed the wondrous cd - option, but was left with many questions...
Why the cd -? Isn't this redundant with cd ..? EDIT [As FatalError points out, these two commands don't do the same things... so the answer is "no"]
Can you delve farther back into your history with - flag, a la in a browser? e.g. When I type cd -, it takes me to my previous directory, but then if I enter that command again, it takes me to the directory I just came from, creating a sort of loop. Is a shorthand for going back multiple levels supported?EDITI realize I can go back with cd .., but was hoping this could be a gateway to a less verbose deep back, e.g. cd -3 vs. cd ../../../ ... hopefully that clarifies what I'm asking....EDIT2As to the current feedback, while .. is a special directory, I don't see a reason why the built-in cd to the terminal couldn't use a shorthand for ../../ ... ../ e.g. cd ..5 or why the built-in also couldn't have a history (a la auto pushd/popd) that could be turned on and used like cd -3. I get that this could be somewhat of security/privacy risk, but I don't see how it's any worst than storing a command history, which most shells/terminals do.
The manpage for cd, accessible via man cd and help cd (it's the same for either command), only lists -L and -P flags. However when I type in cd --help it outputs Usage: cd [-plvn][-|<dir>].. Am I right in assuming the other flags and the - (back) option are nonstandard?
What are the -n and -v flags for? Both seem to take me back to my home directory, that's all I've been able to figure out via experimentation.
A quick read on web resources [1][2] offered just the same sort of info that the man page did and didn't answer my questions.
Note: The second Linux-centric resource above claimed cd only had two options (obviously not true in current CentOS) hence my assumption that this functionality could be non-standard.
I've used this question's answer by user "Moab" to give myself permission to delete an empty folder, so that I no longer get "accessed denied". However, now when I try removing this folder, I get a message that says "The process cannot access the file because it is being used by another process." This is merely my "eclipse" (IDE) folder that I totally emptied out and am trying to delete, but for some reason cannot. I've tried quite a few things:
Via Windows Explorer:
Right Click - Delete
Via Command Prompt
RD /S /Q eclipse
del /F eclipse
rmdir /S eclipse
I'm out of ideas, and I'd really like to delete this folder without having to install any software. I've done a bit of research and this is all I found that I could try. Does anyone have any other ideas?
everyone. I'm using rsync3.1.0pre1 on Mac OS X 10.8.5, and am trying to rsync one folder to another. The destination is a ZFS volume mounted via SMB.
The problem I'm having is that files that start with underscore (e.g., '_filename.jpg') are not being successfully synced to the destination. I get the following error message:
rsync: mkstemp "/path/to/destination/._filename.jpg.NUgYJw" failed: Permission denied (13)
In this case, '_filename.jpg' does not make it to the destination.
I understand that rsync creates hidden, temporary files at the destination which are preceded with '.' and have a random file extension appended on the end. But the original filename starts with '', not '.', and I haven't asked rsync to copy extended attributes / resource forks over (unless it always does it).
The rsync command I'm using is:
rsync -avE --exclude='.DS_Store' --exclude '.Trash' --exclude 'Thumbs.db' --exclude '._*' --delete /source/ /destination/
Has anyone found a way around this problem? Thank you!
I've been trying to think of a method to do this for days, but have not come up with anything yet. Ideally, this is what I'm looking to do:
From a windows XP machine, I need to open an SSH connection to a remote host, send the arp command, and pull the text results of the command back for use on the client. I will need to parse this data and preferably produce a 2D array of IPs and MAC addresses. There will be no shared keys, this is all done with a username and password that will always be different, they will need to be fed into the command via variables that will be pulled from a database using an autoit script based on the WAN ip of the remote host.
Now the actual parsing of the data and creation of the array will be easy if I can just get the text of the arp table. Is there any way to ssh to a remote host, run a command and return the data from that command to the client in a batch script or perl script (it is ok if it writes the text to a file, I can read it out of the file later, I just need it to get to the client)?
I'd like to check the version of Firefox through Apple Remote Desktop of all managed computers. I have written this, but it only checks for Firefox in /Applications
/bin/cat /Applications/Firefox.app/Contents/Info.plist | grep -A 1 CFBundleShortVersionString | grep string | sed 's/[/]//' | sed 's/<string>//g'
For standard users Firefox auto update breaks if it is in /Applications so I instead have it installed in ~/Applications
I'd like to check that copy (if it exists), but I can't specify the path in the command since it is unique to each computer. For example:
/Users/jon/Applications/Firefox.app
/Users/arya/Applications/Firefox.app
Presumably I want to use find and pipe the result to my command. This should work for 10.6 through 10.8
I am experiencing some odd behaviour when using findstr to search a collection of .php files.
Depending on how I specify the file list, the file is not being found, even though it contains the string in question.
These two files contain the string "personemail": Content.php and People.php
A) Works as expected (finds personemail in Content.php and People.php)
findstr /i /s /c:"personemail" *
B) Fails (finds only in Content.php) - expected to find in Content.php and People.php
findstr /i /s /c:"personemail" *.php
C) Works as expected (finds in People.php):
findstr /i /s /c:"personemail" p*.php
What is going on?
Let's say I entered a bunch of commands one after another:
rm blah.txt
pwd
ls
cd ..
cd blah
pwd
If I want to get "rm blah.txt" to appear again without typing the whole thing again, I can press up 6 times.
But is there a faster way? Can filter my command history based on some text?
Intuitively, I would like to just type in r and then press up to search through my command history for only commands that started with "r".
I'm trying to install VMware-vSphere-CLI-5.0.0-422456.x86_64 onto CentOS 6.0 64bit, but the installer complains:
CPAN not able to install following Perl modules on the system. These must be
installed manually for use by vSphere CLI:
UUID 0.03 or newer
I tried to do
sudo yum install uuid-perl
and also
sudo yum install perl-SOAP-Lite perl-Data-Dump perl-Class-MethodMaker perl-Crypt-SSLeay perl-libxml-perl perl-XML-LibXML-Common
but this doesn't help.
What else can I try to do?
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 am using format command in cmd to format a USB flash drive.
M:\>format /FS:FAT32 /Q
Required parameter missing -
M:\>format M: /FS:FAT32 /Q
Insert new disk for drive M:
and press ENTER when ready...
The type of the file system is FAT32.
QuickFormatting 14999M
Format cannot run because the volume is in use by another
process. Format may run if this volume is dismounted first.
ALL OPENED HANDLES TO THIS VOLUME WOULD THEN BE INVALID.
Would you like to force a dismount on this volume? (Y/N) y
Volume dismounted. All opened handles to this volume are now invalid.
Initializing the File Allocation Table (FAT)...
Volume label (11 characters, ENTER for none)?
Format complete.
14,6 GB total disk space.
14,6 GB are available.
8 192 bytes in each allocation unit.
1 917 823 allocation units available on disk.
32 bits in each FAT entry.
Volume Serial Number is E00B-2739
M:\>
Is it safe to force a dismount like this, and make the handles invalid?
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.
I am trying to modify my CMD, to show only current dir name dynamically
like:
Desktop $
When i switched the folder, it must be updated.
It is not required to be code in purely batch file, it may depend any external commands, cygwin bash, etc.
@echo off
set a=bash -c "pwd | sed 's,^\(.*/\)\?\([^/]*\),\2,'"
%a%
cmd
outputs
_test-et
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. Tüm haklari saklidir.
>>
But
>> prompt %a%
gives
bash -c "pwd | sed 's,^\(.*/\)\?\([^/]*\),\2,'"
Hi,
I'm using two network connections, and I tried using the "route" command so that when I access a specific internal IP on my LAN, it would use connection 1, anything else would go normally through connection 2 (which doesn't have access to my LAN).
The problem is I have a bunch of internal IP's that I need to access, and the "route" command doesn't seem to allow me to add an IP range instead of specific IP. And connection 1 doesn't have internet access, so I can't use it as my default connection.
Any idea how this can be solved?
Your help is appreciated
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)
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.
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 want to delete all folders starting with "A" letter (including subfolder/files).
For example There are three folder in D directory (D:\Air, D:\Abonden, D:\All....)
And we need to delete all folders with "A"
I try this: == RMDIR D:\A* /s /q <== but I get error :(
del command works with * but I dont want to delete only files also I want to delete folders ...
Cant we do this via RMDIR?
Thak you in advance
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?
It's neither a secure idea nor one I'd recommend elsewhere, but I have a situation when occasionally it takes a while for my Ansible ad-hoc command to respond. I'd love to pipe or args or whatever is needed to push the required text into the prompt so I can walk away and know it will finish.
Ex:
$ ansible all -m shell -a "reboot" --ask-pass
Password:
blah blah blah it worked
I'd love to send an argument or << or something to get the password in. Is that possible?
I use the following commands to sync folders. Each command requires me to type in the password. How can I group these commands to only enter the password once? Thanks.
rsync -ave ssh /opt/lampp/htdocs/new/folder1/ [email protected]:/home/folder1/
rsync -ave ssh /opt/lampp/htdocs/new/folder2/ [email protected]:/home/folder2/
rsync -ave ssh /opt/lampp/htdocs/new/folder3/ [email protected]:/home/folder3/
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.