F.S.M. - Folder Selection Menu is a bash script that displays the folders in the default folder (works with openSUSE 12.3). It allows the selection of any listed folder, where upon it will list the folders in the newly selected folder. You can select any folder or backup one folder. You can also request a directory listing of the present folder.
Version 1.10 now displays folder names in columns. Which allows more folders to be be displayed on the screen.
Version 1.11 eliminated the … option when in the root / system folder.
Version 1.12 fixed a root folder display issue, added in more comments.
Version 1.14, which just skipped over 1.13, adds more comments and corrects some misspelled words.
Version 1.20 adds in COLOR which can be turned off, you can now view .hidden folders as true/false/only. You can turn hidden folders on and off when you start fsm.
Just type in . fsm -h for more information.
When you exit F.S.M., you will find you are in the new default folder you selected while in the fsm bash script. So you can use fsm to change your default folder in a terminal session by just selecting a folder from a list of folders. A much easier way to fly (navigate folders) in a terminal session I would say. Try it, you will like it!!
Copy and Paste the text of this script into a text editor and save it as the file fsm in your home area bin folder (~/bin/fsm). The script has become too large to be posted in a message here and is now included in SUSE Paste.
F.S.M. - Folder Selection Menu - Version 1.20
Open the above Link in a new Tab. Select the Download option in the top right and then select Open With Kwrite or other text editor and then save the bash script text file as ~/bin/fsm. It is possible to directly download fsm using the following terminal command (You must delete the old copy of fsm first):
rm ~/bin/fsm
wget -nc http://paste.opensuse.org/view/download/53978354 -O ~/bin/fsm
This script must be marked executable to be used. Please run the following Terminal command:
chmod +x ~/bin/fsm
It is even possible to string all three of these commands together as one. Copy the following command, open up a terminal session, paste it in and press enter:
rm ~/bin/fsm ; wget -nc http://paste.opensuse.org/view/download/53978354 -O ~/bin/fsm ; chmod +x ~/bin/fsm
In order to run fsm, open up a terminal session and type in the following command:
. fsm
Notice that you type in dot <space> fsm which is not so normal. Placing a dot <space> in front of fsm allows it to change your default folder after you exit the script. Normally, running a script spaws a new shell and the default folder will be lost when that script ends. Notice that there is only one exit command in fsm, which is used when you run fsm without the dot <space> as required. When using the dot <space> command, using an exit command anywhere else would cause the terminal session to close when run from a desktop like KDE or GNOME. While fsm is not complex, it shows how several interesting tasks are performed and thus might be useful in another script that you might write.
As always, I would love to hear any comments on fsm that you might have.
Thank You,
Blogs: asroot : Bash : Packet Filter : C.F.U. : GPU’s : fewrup : F.S.M. : H.I. : nVIDIA : LNVHW : N.S.F. : S.A.K.C. : MMCHECK
S.A.S.I. : S.C.L.U. : S.G.T.B. : S.K.I.M. : S.L.A.V.E. : S.L.R.C. : S.T.A.R.T. : S.U.F.F. : SYSEdit : systemd : YaST Power