51
edits
No edit summary |
No edit summary |
||
Line 118: | Line 118: | ||
Okay. Imagine, you just want to know about the files and directories containing the sequence "run". In order to achieve this, you can pass the output of the "ls" command to another program. A very common filter program is "grep". You use "grep" by telling the program what to filter. Directing the output of "ls" to "grep" (filtering for "run") is by using the ''pipe'' symbol: "|" | Okay. Imagine, you just want to know about the files and directories containing the sequence "run". In order to achieve this, you can pass the output of the "ls" command to another program. A very common filter program is "grep". You use "grep" by telling the program what to filter. Directing the output of "ls" to "grep" (filtering for "run") is by using the ''pipe'' symbol: "|" | ||
username@computername:~/flightgear$ ls | grep run | username@computername:~/flightgear$ ls | grep run | ||
fgrun | fgrun | ||
run_fgcom.sh | run_fgcom.sh | ||
run_fgfs.sh | run_fgfs.sh | ||
run_fgfs_test.sh | run_fgfs_test.sh | ||
run_fgfs_test.sh~ | run_fgfs_test.sh~ | ||
run_fgjs.sh | run_fgjs.sh | ||
run_fgjs.sh~ | run_fgjs.sh~ | ||
run_fgrun.sh | run_fgrun.sh | ||
run_fgrun.sh~ | run_fgrun.sh~ | ||
run_js_demo.sh | run_js_demo.sh | ||
run_js_demo.sh~ | run_js_demo.sh~ | ||
run_terrasync.sh | run_terrasync.sh | ||
Easy, isn't it? | Easy, isn't it? | ||
Line 168: | Line 168: | ||
username@computername:~/flightgear$ ls -l | grep download_and_compile.sh | username@computername:~/flightgear$ ls -l | grep download_and_compile.sh | ||
-rwxr-xr-x 1 username usergroupname 15263 2009-02-05 21:23 download_and_compile.sh | -rwxr-xr-x 1 username usergroupname 15263 2009-02-05 21:23 download_and_compile.sh | ||
username@reggae-machine:~/flightgear$ chmod -x download_and_compile.sh | username@reggae-machine:~/flightgear$ chmod -x download_and_compile.sh | ||
username@reggae-machine:~/flightgear$ ls -l | grep download_and_compile.sh | username@reggae-machine:~/flightgear$ ls -l | grep download_and_compile.sh | ||
-rw-r--r-- 1 username usergroupname 15263 2009-02-05 21:23 download_and_compile.sh | -rw-r--r-- 1 username usergroupname 15263 2009-02-05 21:23 download_and_compile.sh | ||
username@reggae-machine:~/flightgear$ chmod +x download_and_compile.sh | username@reggae-machine:~/flightgear$ chmod +x download_and_compile.sh | ||
username@reggae-machine:~/flightgear$ ls -l | grep download_and_compile.sh | username@reggae-machine:~/flightgear$ ls -l | grep download_and_compile.sh | ||
-rwxr-xr-x 1 username usergroupname 15263 2009-02-05 21:23 download_and_compile.sh | -rwxr-xr-x 1 username usergroupname 15263 2009-02-05 21:23 download_and_compile.sh | ||
Notice, that "download_and_compile.sh" | Notice, that "download_and_compile.sh" |
edits