How can I delete all files in my folder, except Music -subfolder?
Duplicate Unable to remove everything else in a folder except FileA I guess that it is slightly similar to this: delete [^Music] However, it does not work. ...
Duplicate Unable to remove everything else in a folder except FileA I guess that it is slightly similar to this: delete [^Music] However, it does not work. ...
On a Mac, I have a txt file with two columns, one being an autoincrement in an sqlite table: , "mytext1" , "mytext2" , "mytext3" When I try to import this file, I get a datatype mismatch error: .separator "," .import mytextfile.txt mytable How should the txt file be structured so that it uses the autoincrement? Also, how do I ente...
I guess other editors are smart enough to turn that stuff off for pasting but when using vim in a terminal it can't distinguish between pasting and actual typing. What kinds of solutions or workarounds do you have for this? Added: there's also a setting that makes comments automatically continue on the next line. The indenting at leas...
The windows terminal (the user-interface around text-applications like cmd.exe) really sucks. There is so much that the Unix-style terminals do that the windows terminal apparently cannot do, for example what if you want to re-size the window in both dimensions by dragging the border. The Windows terminal only allows you to change it's ...
Is there a way to use "alt/option" key as a meta key but still be able to use the key to make some characters which need it? For example in my local keyboard layout: @ is alt-2 \ is alt-shift-7 | is alt-7 etc. So if I set alt as meta key, I can't make those characters. On the other hand using "press esc, release esc, press a key" to...
My only way of communication with my embedded device is a serial port. By default, embedded Linux uses this port as a terminal. How do I disable this terminal and use the serial link to transfer binary data? I heard of commands like rx and tx but i cannot find them. I think I can just read() from and write() stuff to /dev/tty but I want...
I have a program that I run through the command line and I wanted to print out bold or styled text similar to how the man pages are bold (I can't think of a styled example offhand). How do I style text sent to the terminal? If it makes a difference, I'm running a MacOSX terminal. ...
How can I tell if STDIN is connected to a terminal in Perl? ...
I see in the AppleScript dictionary that the current screen's worth of text and the history buffer are available as properties. How would I AppleScript that to copy the contents of the currently selected Terminal.app tab to the paste buffer? Could I do it on the command line? What about the whole history log? ...
There is a remote machine, on which I login with ssh. On that machine, we have a Xwindows GUI program, namely nedit. All the keyboards shortcuts like CTRL-O or ALT-F for that program are broken (whereas other programs work just fine). Now the weird thing is that for another user these shurtcuts work! He has the same shell (bash) and th...
Hi, i'm doing a dir listing in my .ssh home dir which gives me a strange result: ls -lsa .ssh/ total 0 ? ?--------- ? ? ? ? ? . · ? ?--------- ? ? ? ? ? .. · ? ?--------- ? ? ? ? ? authorized_keys · The weird thing is, that this only happens for one user and only in this specific directory. If I do ...
Is it possible to change the background color of Terminal.app from the shell? If so, how? ...
Is there a way in python to programmatically determine the width of the console? I mean the number of characters that fits in one line without wrapping, not the pixel width of the window. Edit Looking for a solution that works on Linux ...
Hi Guys, I'm pretty old school sometimes and I like working with Emacs in my terminal. (I work with IDEs all the time. But sometimes, when in the privacy of my own home, I just like a text editor a terminal and a beer) However, the default Emacs that comes with OS X does not seem to highlight the comments in font-lock-mode. I've seen ...
I'm playing around with making a simple terminal-based game with Ruby, and I'm currently trying to come up with a way of reading input from the terminal. So far I've been using gets, but I'd like to have the game react instantly without requiring a newline (so you don't need to press a key, THEN enter). I've figured out I need to put t...
I'm working on configuring the iTerm terminal emulator for the Mac to do what I want. Apparently everything is done through what they call "bookmarks." OK, fine. I'm trying to create a bookmark that will open a tab, cd to a certain Rails project, and run the command script/server. What's supposed to happen is that this will launch the se...
I have a folder in my Desktop. I want to copy it to my server in Terminal. I tried this unsuccessfully [~/bin]# cp -r /Users/Sam/Desktop/tig-0.14.1 ~/bin/ cp: cannot stat `/Users/Sam/Desktop/tig-0.14.1': No such file or directory [edit] I run the command in my server. The problem seems to be in the fact that "/Users/Sam/Desktop/tig-...
How can I have another Terminal open when I am at my server by ssh? I do not want to type my password twice to get another terminal for my server. Perhaps, Bash has buffers similarly as Vim. ...
Hi, I want to open the terminal (command prompt) on a Linux machine using Java code. I know how to open command prompt in windows.The following code i have used in windows String command= "cmd c/start cmd.exe" Runtime rt = Runtime.getRuntime(); Process pr = rt.exec(command); I need the same thing in Linux. Thanks for your answers. I ...
Is it possible for the terminal to detect < Shift-Enter > or < Control-Enter > keypresses? I am trying to configure vim to do key mappings that use these sequences, and while they work fine in gvim, they don't seem to work in any terminal console. The curious thing is that although < C-Enter > is not detected in vim, mapping < Enter > ...