Tag Info

Hot answers tagged

12

The shell attempts expansion of the glob pattern before it passes the expanded result to cp (actually, it is passing the result to sudo which then passes it unchanged to cp). Since the shell (it is running as you, not root) is not able to traverse the directory, cp ends up receiving the unexpanded pattern in its argument list. cp does not perform any glob ...


6

You normally would run chsh (see for example Changing Shells on IBM AIX). However, if bash is not listed in these files, then you could break your login: /etc/shells and /etc/security/login.defs As a workaround, you could make your shell's login initialization script run bash directly. That would work if your shell is csh, for instance, by modifying ...


1

Here's what you need: find -name "(*)*" -type f | rename 's/\(|\)//g' It first finds files in the current directory matching the described name, then renames them by removing the brackets. You can see the matching characters ( and ) are replaced with nothing.


1

Another way is to do : md5sum filename |cut -f 1 -d " " Cut will split line to each space and return only first field.


1

This bash function will block until the given file appears or a given timeout is reached. The exit status will be 0 if the file exists; if it doesn't, the exit status will reflect how many seconds the function has waited. wait_file() { local file="$1"; shift local wait_seconds="${1:-10}"; shift # 10 seconds as default timeout until test ...


1

If you just want to replace <author type=''><\/author> with <author type='Local'><\/author>, you can use that sed command: sed "/<fiction type='a'>/,/<\/fiction>/ s/<author type=''><\/author>/<author type='Local'><\/author>/g;" file But, when you dealing with xml, I recommend an xml parser/editor ...


1

With X your apps should run on user machines with DISPLAY env var pointing your machine with X server. In this case apps will be displayed there. SSH X forwarding sets this variable for SSH session, so you may connect by SSH to your user machine and forward its X to your machine with display. I am not sure if it is possible to extend one desktop between ...



Only top voted, non community-wiki answers of a minimum length are eligible