| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| diff.bat | 2016-08-24 | 26 Bytes | |
| jdiff.java | 2016-08-24 | 10.5 kB | |
| ReadMe.txt | 2016-08-24 | 8.8 kB | |
| All_Files.zip | 2016-08-24 | 32.9 kB | |
| jdiff.class | 2016-08-24 | 5.7 kB | |
| jrm.java | 2016-08-24 | 2.9 kB | |
| jrm.class | 2016-08-24 | 3.0 kB | |
| jls.class | 2016-08-20 | 4.4 kB | |
| jls.java | 2016-08-20 | 5.1 kB | |
| ls.bat | 2016-07-28 | 24 Bytes | |
| rm.bat | 2016-07-28 | 24 Bytes | |
| mv.bat | 2016-07-28 | 24 Bytes | |
| jcp.java | 2016-07-28 | 6.5 kB | |
| jmv.java | 2016-07-28 | 6.5 kB | |
| jcp.class | 2016-07-28 | 4.4 kB | |
| jmv.class | 2016-07-28 | 4.4 kB | |
| cat.bat | 2016-07-28 | 25 Bytes | |
| cp.bat | 2016-07-28 | 24 Bytes | |
| grep.bat | 2016-07-28 | 26 Bytes | |
| jcat.class | 2016-07-28 | 3.5 kB | |
| jcat.java | 2016-07-28 | 2.5 kB | |
| jgrep.class | 2016-07-28 | 7.7 kB | |
| jgrep.java | 2016-07-28 | 9.2 kB | |
| License.txt | 2016-07-28 | 243 Bytes | |
| Totals: 24 Items | 118.2 kB | 1 |
** Java 1.8.0_92 have been used for these programs. These programs have been tested on Windows 10.
** These programs act like on linux/unix/cygwin but they are not as complete as on linux/unix/cygwin,
but whatever functionalities have been provided, they work well.
** Download and Install instructions:
*** Create a directory and download all files in the same directory. Let's call this directory C:\linux-command-line.
*** Now, add the following directories (for Java, assuming you have already downloaded and installed Java) to your
"system" PATH environemnt variable (not for your account but system environment variable):
If Java has been installed in C:\Program Files\Java\jre1.8.0_92 then add the following directories to
system PATH environment variable (Add using edit text directly):
;C:\Program Files\Java\jre1.8.0_92;C:\Program Files\Java\jre1.8.0_92\bin;C:\Program Files\Java\jre1.8.0_92\lib
Please note that all directories should be separated by a semi-colon.
*** Next, create a "system" CLASSPATH environment variable (if not already present) (CLASSPATH contains diretories where
Java looks in for finding classes) so that you can place your classes anywhere in the filesystem and execute the commands
from any directory.
We have already created C:\linux-commnd-line where all the classes that you downloaded reside, so we will add this
directory to CLASSPATH plus a few more.
So, create a system CLASSPATH environment variable and add the following directories:
.;C:\linux-command-line;C:\Program Files\Java\jre1.8.0_92;C:\Program Files\Java\jre1.8.0_92\bin;C:\Program Files\Java\jre1.8.0_92\lib;
Please note that we have added '.' directory at the beginning.
*** Please refer to these two pages for more details (or you can google for java CLASSPATH on Windows, java PATH on Windows, etc.):
https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html
*** If you want to execute the following commands just the same as on linux/unix/cygwin then create
appropriate batch files (already provided) in C:\linux-command-line and add this directory to
your system PATH environment variable (you might have already done this in the above step).
----------------------------
jls: It is a subset of "ls" on linux/unix/cygwin.
* Usage: java jls [OPTION]... [FILE]...
List information about FILES (the current directory by default).
Options are listed below:
-l use a long listing format (enabled by default)
-R list subdirectories recursively
--help display this help and exit
Options can be listed together (ls -lR) or separetly (ls -l -R).
* ls.bat has been attached to execute "java jls" as "ls".
----------------------------
jrm: It is a subset of "rm" on linux/unix/cygwin.
* Usage: java jrm [OPTION]... [FILE]...
Remove the FILE(s).
Options are listed below:
-i prompt before every removal (enabled by default)
--help display this help and exit
Directories cannot be deleted for now.
* rm.bat has been attached to execute "java jrm" as "rm".
----------------------------
jmv: It is a subset of "mv" on linux/unix/cygwin.
* Usage: java jmv -i source_file target_file
java jmv -i source_file target_folder
java jmv source_file target_file (Omitting -i option does not matter, -i will be forced)
java jmv source_file target_folder (Omitting -i option does not matter, -i will be forced)
java jmv -help
Directories cannot be moved for now.
-i option will be forced if not present.
If target file is present then move operation will fail.
If target_folder\source_file exists then move operation will fail.
* mv.bat has been attached to execute "java jmv" as "mv".
----------------------------
jcp: It is a subset of "cp" on linux/unix/cygwin.
* Usage: java jcp -i source_file target_file
java jcp -i source_file target_folder
java jcp source_file target_file (Omitting -i option does not matter, -i will be forced)
java jcp source_file target_folder (Omitting -i option does not matter, -i will be forced)
java jcp -help
Directories cannot be copied for now.
-i option will be forced if not present.
If target file is present then copy operation will fail.
If target_folder\source_file exists then copy operation will fail.
* cp.bat has been attached to execute "java jcp" as "cp".
----------------------------
jcat: It is a subset of "cat" on linux/unix/cygwin.
* Usage: java jcat some_file
java jcat one_file second_file more_files
java jcat some_directory\some_file
java jcat some_file one_directory\one_file more_directories\more_file some_other_file
java jcat -help
jcat does not work on directories.
* cat.bat has been attached to execute "java jcat" as "cat".
----------------------------
jgrep: It is a subset of "grep" on linux/unix/cygwin.
* Usage: java jgrep search_text some_file
java jgrep "search_text more_search_text" some_file (If search text contains spaces then use quotes)
java jgrep -i search_text some_file (for case insensitive search)
java jgrep -i "search_text more_search_text" some_file
java jgrep search_text some_file more_files
java jgrep "search_text more_search_text" some_file more_files
java jgrep -i search_text some_file more_files
java jgrep -i "search_text more_search_text" some_file more_files
java jgrep -r search_text some_dir (Search recursively)
java jgrep -r "search_text more_search_text" some_dir
java jgrep -i -r search_text some_dir (case insensitive recursive search)
java jgrep -i -r "search_text more_search_text" some_dir
java jgrep -r search_text some_dir more_dirs
java jgrep -r "search_text more_search_text" some_dir more_dirs
java jgrep -i -r search_text some_dir more_dirs
java jgrep -i -r "search_text more_search_text" some_dir more_dirs
java jgrep -r search_text some_file some_dir
java jgrep -r "search_text more_search_text" some_file some_dir
java jgrep -i -r search_text some_file some_dir
java jgrep -i -r "search_text more_search_text" some_file some_dir
java jgrep -r search_text some_file more_files some_dir more_dirs
java jgrep -r "search_text more_search_text" some_file more_files some_dir more_dirs
java jgrep -i -r search_text some_file more_files some_dir more_dirs
java jgrep -i -r "search_text more_search_text" some_file more_files some_dir more_dirs
some_command | java jgrep search_text (In absence of any file or directory, standard input is read and -r option is ignored if present)
(In this case it will read the standard output of some_command which is the standard input for jgrep)
some_command | java jgrep "search_text more_search_text"
some_command | java jgrep -i search_text
some_command | java jgrep -i "search_text more_search_text"
java jgrep -help
Recursive search can be done using -r option.
-r option is ignored in case of a file.
-r option is supported, -R (capital r) is not supported.
Directory is omitted if -r option is not present.
List options separately like -i -r and not -ir.
In absence of any file or directory, standard input is read and -r option is ignored if present. So, you can pipe the output of some other program/command into jgrep.
You can mix options, files, and directories freely but appropriate options have to be present for correct search.
REGULAR EXPRESSIONS ARE SUPPORTED.
* grep.bat has been attached to execute "java jgrep" as "grep".
----------------------------
jdiff: It is a subset of "diff" on linux/unix/cygwin.
* Usage: java jdiff [OPTION]... FILES
Compare FILES line by line.
Options are listed below:
-i ignore case differences in file contents
--binary read data in binary mode
--help display this help and exit
FILES are FILE1 FILE2.
If --binary option is present then -i option is ignored.
For now jdiff prints only whether FILES are identical or different.
Directories cannot be compared for now.
* diff.bat has been attached to execute "java jdiff" as "diff".
----------------------------