Display only files and folders that are symbolic links in tcsh or bash
Find all the symbolic links in a directory: ls -l `find /usr/bin -maxdepth 1 -type l -print` For the listing of hidden files: ls -ald .*
Find all the symbolic links in a directory: ls -l `find /usr/bin -maxdepth 1 -type l -print` For the listing of hidden files: ls -ald .*
Shelve the changes in the pending changelist, then run p4 describe -S -du 999
I have good experience with the following code. It doesn’t require any special user permissions: import resource, sys resource.setrlimit(resource.RLIMIT_STACK, (2**29,-1)) sys.setrecursionlimit(10**6) It does however not seem to work with pypy. If resource.setrlimit doesn’t work, you can also try using threads: sys.setrecursionlimit(10**6) import threading threading.stack_size(2**26) threading.Thread(target=main).start()
To remove newlines, use tr: tr -d ‘\n’ If you want to replace each newline with a single space: tr ‘\n’ ‘ ‘ The error ba: Event not found is coming from csh, and is due to csh trying to match !ba in your history list. You can escape the ! and write the command: … Read more
In csh, you can either try env: % env LD_LIBRARY_PATH=/foo/bar myprogram or, a subshell: % (setenv LD_LIBRARY_PATH /foo/bar; myprogram)
Try with: xargs –show-limits </dev/null Your environment variables take up 2446 bytes POSIX upper limit on argument length (this system): 2092658 POSIX smallest allowable upper limit on argument length (all systems): 4096 Maximum length of command we could actually use: 2090212 Size of command buffer we are actually using: 131072 There is no limit per … Read more
The csh shell has never been known for its extensive ability to manipulate file handles in the redirection process. You can redirect both standard output and error to a file with: xxx >& filename but that’s not quite what you were after, redirecting standard error to the current standard output. However, if your underlying operating … Read more
sed can use any separator instead of / in the s command. Just use something that is not encountered in your paths: s+AAA+BBB+ and so on. Alternatively (and if you don’t want to guess), you can pre-process your path with sed to escape the slashes: pwdesc=$(echo $PWD | sed ‘s_/_\\/_g’) and then do what you … Read more
It does affect, at least bash in my environment, but in very unpleasant way. See these codes. First a.sh: #!/bin/sh echo “First echo” read y echo “$y” echo “That’s all.” b.sh: #!/bin/sh echo “First echo” read y echo “Inserted” echo “$y” # echo “That’s all.” Do $ cp a.sh run.sh $ ./run.sh $ # open … Read more
I had this problem in a program I wrote a year ago — turns out the answer is rather complicated. You’ll need to use nohup as well as output redirection, as explained in the wikipedia artcle on nohup, copied here for your convenience. Nohuping backgrounded jobs is for example useful when logged in via SSH, … Read more