Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Find and rename all folders with name X. Post 302120486 by mkingrey on Wednesday 6th of June 2007 04:20:26 PM
Old 06-06-2007
How can I make this prompt me to enter the PrevName and NewName when the program is first run?

Also do I just need to save this somewhere on my unix box use chmod filename to compile and then enter the file name at the command prompt?

Thanks!!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Script to Find Diff from two folders

Hi I would like to find the diff between two folders: Ex: Folder:1 html.java go.java ten.java Folder:2html.java go.java ten.java you.java Questions comes: Folder:1 contains a files with old version, know the files were modified and updated with the new version in Folder2. I... (2 Replies)
Discussion started by: gkrishnag
2 Replies

2. UNIX for Advanced & Expert Users

find only folders

is there an option in find command to search only for folders (not subfolders). thx (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

3. UNIX for Dummies Questions & Answers

Removing empty folders using 'find'

Hey there! I try to use 'find' to remove empty directories like this: find . -depth -type d -empty -exec rm -rf {} ';' It works just fine, but there are some directories i want to exclude. So i tried to do sth like this: find . -depth -type d -empty -exec grep -v "not this one please" -exec... (5 Replies)
Discussion started by: deTTo
5 Replies

4. Shell Programming and Scripting

Find empty folders

In current folder, there are many subfolders, subfolder's subfolders... under it. How can I find out the empty folders with no files in it. I only need the top folder list. For example, I have folders like below: a/b/c a/b/x/x.txt a/s a/s/y I need get the folder a/s, but not... (6 Replies)
Discussion started by: rdcwayx
6 Replies

5. UNIX for Dummies Questions & Answers

Find folders that do NOT contain a certain file

I'm no linux guru so any help would be greatly appreciated! I need to output all folders that do not contain a file of a certain extension. Currently I have the following find / ! -name '*.txt' -printf %h\\n This doesn't work because although it finds folders that do not contain *.txt,... (2 Replies)
Discussion started by: hodnov
2 Replies

6. UNIX for Dummies Questions & Answers

Rename files to indexnumber in multiple folders

I have multiple subfolders with multiple jpg I want the group of files in each subfolder renamed to their index number (3 digits) in the folder, so: folder/a.jpg = folder/001.jpg folder/b.jpg = folder/002.jpg folder/c.jpg = folder/003.jpg folder2/1.jpg = folder2/001.jpg folder2/2.jpg =... (2 Replies)
Discussion started by: cmanniche
2 Replies

7. Shell Programming and Scripting

Find and Rename files using (find mv and sed)

In response to a closed thread for degraff63 at https://www.unix.com/shell-programming-scripting/108882-using-mv-find-exec.html the following command might do it as some shells spit it without the "exec bash -c " part: Find . -name "*.model" -exec bash -c "mv {} \`echo {} | sed -e 's//_/g'\`"... (0 Replies)
Discussion started by: rupert160
0 Replies

8. Shell Programming and Scripting

Moving files to folders and rename

Hello! I am new to this. I have many files from b_ap00 to b_ap80, and I need to move them to folder 00 to 80 respectively, where b_ap00 is in folder 00, b_ap01 is in folder 01. On top of this, I need to rename the file once they are inside the folder to b_ot, and subsequently run it (ifort -o... (8 Replies)
Discussion started by: krustytherusty
8 Replies

9. Shell Programming and Scripting

Recursivly rename folders removing characters as required

HI guys here's hoping some on pout the can help I have a large library of epub and mobi file creates some what by calibre. Output of tree listing below I would like to recursively rename the directories removing the brackets and numbers I have been scratching my head over... (4 Replies)
Discussion started by: dunryc
4 Replies

10. UNIX for Advanced & Expert Users

Find files in specific folders

Hi Team, I am new to the linux commands and I really need help . I would be really thankful if I can get some inputs. I have below folders in the path "/home/temp" 20170428 20170427 20170429 changes tempI need to get the files generated in the last 15 mins in all the above folders... (4 Replies)
Discussion started by: JackJinu
4 Replies
MPROMPT(1)							      mprompt								MPROMPT(1)

NAME
mprompt - simple prompt-based control for mpd SYNOPSIS
mpompt [-s] [-m key=key] [-t n] [-f] [tty] [-T] [host] DESCRIPTION
mprompt is a mpd client with a prompt-based interface. It is designed to be usable on a headless machine. At the prompt, enter the name of a playlist, or part of the name of an album, artist, or song. Matching items will start playing. You can also paste in urls to stream. (If the perl String::Approx module is available, it will be used to handle typos, etc in the names you enter.) Use the left and right arrow keys to adjust volume, and the up and down arrow keys to move through the playlist. The Tab and Enter keys can both be used to pause and unpause playback. (Enter toggles pause only if nothing has been entered at the prompt.) Example of how to run mprompt in /etc/inittab: 1:2345:respawn:/usr/bin/mprompt /dev/tty1 OPTIONS
-s This option allows shell commands to be typed in to mprompt, to be run by whatever user it is running as. (Typically root if it is run from /etc/inittab). To enter a shell command, type a "!", followed by the command to run, followed by Enter. -m key=key This option allows remapping keys. Any key can be remapped to any other key, which is useful to support keyboard with unusual key layouts, or missing keys. For alphanumeric and punctuation keys, individual symbols can be remapped. For example, "-m a=b" will turn each entered "a" into "b". For other keys, use the following names: <return> <tab> <space> <up> <down> <left> <right> <backspace> For example, -m "n=<down>" will map the "n" key to the down arrow, causing that key to change to the next track; -m "<space>=<return>" will make the space bar act as a pause. It's possible to swap keys too. For example, -m "<down>=<up>" -m "<up>=<down>" A single key can also be bound to a series of keystrokes. For example, -m "1=Mule Variations<return>" will cause the "1" key to play the "Mule Variations" album, a nice choice. -t n Adds a timeout, a specified number of seconds after which the entry on the command line will be cleared. Useful for headless systems, to avoid cat-on-keyboard confusing your later commands. -T Enables terse output mode. This mode tries to avoid displaying excessive or complex things, with the intent that mprompt's output can be piped into a speech synthesiser, such as espeak. SEE ALSO
vipl(1) mptoggle(1) mpd(1) AUTHOR
Copyright 2009 Joey Hess <joey@kitenet.net> Licensed under the GNU GPL version 2 or higher. http://kitenet.net/~joey/code/mpdtoys perl v5.10.1 2010-03-06 MPROMPT(1)
All times are GMT -4. The time now is 09:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy