Linux command to move a directory
location: linuxexchange.com - date: October 21, 2015
My old and new directory have same folders and files inside.
I try:
mv -if old/* new/*
and get error
mv: cannot move `./xxxxxx' to a subdirectory of itself
How can I move it?
How can I find a file/directory that could be anywhere on linux command line?
location: linuxexchange.com - date: January 1, 1970
Ideally, I would be able to use a program like
find [file or directory name]
to report the paths with matching filenames/directories. Unfortunately this seems to only check the current directory, not the entire folder.
I've also tried locate and which, but none find the file, even though I know its on the computer somewhere.
how to make non bootable iso file and iso via linux command line??
location: linuxquestions.com - date: February 1, 2009
I have non bootable linux iso.
how to make it a bootable iso file via linux command line?? alternative in linux is also preferred.
thank you.
A linux command line to convert voice WAV file to Text file format?
location: ubuntuforums.com - date: September 13, 2010
Hello,
What is the command line to convert a WAV file to Text file? It is some kind of voice recognition, similar to Windows. What is the command under LINUX ?
I recorded my voice from a regular device, and would like to have it as text like under MS Windows.
linux command line, password protect file using script
location: linuxexchange.com - date: July 16, 2010
really new to linux scripting so i figured i would ask rather than waste time pulling my hair out.
i have a simple script that backs up the contents of a folder on my linux box and moves it to S3 storage, i would like this script to create a zip file and password protect it without any intervention from me.
i got it down to
zip myarchive.zip /var/www/* -e
but cannot work out where i should put the password to stop it prompting me.
thanks
kris
How do I send a file as an email attachment using Linux command line?
location:
linuxexchange.com - date:
September 24, 2008
I've created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file. The next step I want to accomplish is to send that tar file through email to a remote email server for safekeeping. I've been able to send the raw script in the body an email by piping the backup text file to mailx like so:
$ cat mysqldbbackup.sql | mailx
[email protected]
cat echoes the backup file's text which is piped into the mailx program with the recipient's email address passed as an argument.
While this accomplishes what I need, I think it could be one step better, Is there any way, using shell scripts or otherwise, to send the compressed .tar file to an outgoing email message as an attachment? This would beat having to deal with very long email messages which contain header data and often have word-wrapping issues etc.
How can I do a yum install in a linux command line from a jar file?
location:
linuxexchange.com - date:
July 8, 2013
I want to be able to execute a jar file in a linux terminal that will run a series of commands to yum install several programs on a server. The goal is to automate some of the install processes because we do so many installs for testing. I have the following code:
public class test
{
public static void main(String[] args)
{
Runtime rt = Runtime.getRuntime();
String cmd;
cmd = "/bin/sh -c yum install -y rpm-build";
rt.exec(cmd);
}
}
When I run it, nothing happens. If I just run "yum install -y rpm-build" it works fine, but not if I run the jar to do it. What am I doing wrong?
Error stream from code/comment below:
[email protected] labStats]# java test
Loaded plugins: fastestmirror
Usage: yum [options] COMMAND
List of Commands:
check Check for problems in the rpmdb
check-update Check for available package updates
clean Remove cached data
deplist List a package's dependencies
distribution-synchronization Sync
How to check if a directory exists in Linux command line?
location: linuxexchange.com - date: June 18, 2011
How to check if a directory exists in Linux command line?
Solution: [ -d ¨a¨ ]&&echo ¨exists¨||echo ¨not exists¨
sh file not found in linux command line
location: linuxexchange.com - date: November 28, 2014
I'm an owner of synology's diskstation NAS server running on special OS (mainly linux)
It has only access from internet. I established command line interface to access it using synology wiki. Now I try to install Counter-Strike server on it using SteamCMD. I just look in Valve Developer Community for it.
I'm writing the next:
mkdir csServer
cd csServer
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
tar xvfz steamcmd_linux.tar.gz
./steamcmd.sh
But the last line causes -sh: ./steamcmd.sh not found. However, I can see this file in the directory.
What actually can cause it?
//ADDED
The file is executable!
Is there a Linux command line tool sequence for converting XML files into a single HTML file?
location: linuxexchange.com - date: July 18, 2014
I have a bunch of XML files, and I would like to visualize them as tables in an HTML file. I have searched on the net and found a tutorial on XML->HTML conversion, and a bunch of blogs describing command line tools for HTML/XML/JSON conversion.
Is it possible to use command line tools in Linux to convert a bunch of XML files into a HTML file where each XML file is represented as a table?
Edit: More background information.
I actually want to analyze the XML output of Google Test, that I'm using to develop geometrical algorithms. Here is how the XML looks like for a single test application:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="27" failures="0" disabled="0" errors="0" timestamp="2014-07-18T10:27:10" time="0.002" name="AllTests">
<testsuite name="lineSegmentIntersection" tests="3" failures="0" disabled="0" errors="0" time="0">
<testcase name="halfspaceNoIntersection" status="run" time="0" classname="lineSegmentIntersection" />
&l
please wait...
Page: 1 2 3 4 5 6 7 8 9 10