Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I don't even know if this is possible.
I have over 4 terabytes of MP3 files and I need a much faster way of editing files. I use a Mac running Yosemite if that makes any difference.
Here is a sample list of files
In bulk, how do I remove the "Elton John", space, hyphen, space, track number, and space from the names of these files, and only leave the track name and file format? Can it be done using terminal and if so, what's the command?
Thanks so much!
brew install rename
rename -v 's/\s*Elton John\s*-\s*\d+\s*-(.*)/$1/' *.mp3
You can use the -n option first to see what would be the changes without affecting the files name.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I am following a tutorial on multi-tenancy in Django (10:58/11:42) and I would like to modify the hosts file which I located alreadty. When I try to add a single letter, I get rejected:
But this leaves me quite confused, this is my laptop, and I do not have permission? Is there a way to do this differently ?
In the terminal type sudo nano /etc/hosts and then hit return.
Enter your administrator password and then hit return.
Then you should be able to edit the file.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I need to take a provided .bin file as input, convert it to string representations, and do a bunch of other fun stuff. The issue is that we are being graded on the school's linux server which I have almost no idea how to use.
On the Linux machine I have created a directory for my program called "read". Inside is my "read.cpp" file. I'm guessing the .bin need to go in this directory, since "read.cpp" utilizes it as input, but I have no clue how I can get it there.
Any help would be greatly appreciated.
I wound up using WinSCP to transfer the file. Makes it super easy. I've used it before and completely forgot it was a thing. Cheers!
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Suppose I have these files in a directory
/var/mydir/web.php
/var/mydir/dbMuseum.php.example
/var/mydir/dbStreet.php.example
In Ubuntu Linux, what would be a one line command which would copy and rename all the files to the same names but without .example on the end?..giving the correct result:
/var/mydir/web.php
/var/mydir/dbMuseum.php.example
/var/mydir/dbMuseum.php
/var/mydir/dbStreet.php.example
/var/mydir/dbStreet.php
Just a bash for construct with parameter expansion would do:
for f in *.example; do mv -i "$f" "${f%.*}"; done
Ubuntu has rename (prename):
rename -n 's/\.[^.]+$//' *.example
-n would do the dry-run, remove -n for actual renaming to take place:
rename 's/\.[^.]+$//' *.example
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
If I have an executable: project/bin/exec, which caches data into a file.txt in its active directory, the location where file.txt will be saved depends on how I run the program:
project/file.txt if I run it from project with bin/exec
project/bin/file.txt if I run it from project/bin with ./exec
I'd like the program to always use the directory of the executable and I'd like to find out if there's a non-programatic way of forcing it to do it.
I'm interested in UNIX/Windows, does this even make sense?
Programatically, I know I could get the executable's directory by using boost or std::experimental filesystem, perhaps args[0] argument and use that path for I/O.
Is that the way to do it?
One way of doing this on Unix (part of the question) would be to use a script which would chdir before running executable.
Something like this:
#!/bin/ksh
loc=`dirname $0`
cd $loc
echo $PWD
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Everytime i open
Inkscape
the magnification is set to
35%
i need it to start with
100%
so i do not end up designing something wrong.
Edit the default template. The path should be: YourPath\Inkscape\share\templates\default.svg
The file should contain values such as:
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
...
Modify "0.35" to whatever value you would like :)
Note: I believe each document contains its own local values that supersede the default values, so changing the default may only affect new documents.