cp myfile /dev/null
if it does not exist it will give you :
cp: cannot stat `myfile': No such file or directory
The 'head' command will list out certain number of lines in a file from the beginning. The standard is to list the first 25 lines, but you can change that: head -100 myfile will list out the first 100 lines of myfile.
You need to use the MS-DOS commands to move a file.
The configuration file for DOS systems. Whenever a DOS computerboots up, it reads the CONFIG.SYS file (if it exists) and executes anycommands in it. The most common commands are BUFFERS= andFILES=, which enable you to specify the buffer size and the number of files that can be open simultaneously. In addition, you can enter commands that install drivers for devices.
Batch File
Batch File
The mv command is used to move a file or directory to another location. Its syntax ismv target destinationFor example:mv myfile /home/user/mystuff
There's no commands in C++.
<html> <head> <title>Image Upload</title> </head> <body> <form action="img.php" method="POST" enctype="multipart/form-data"> File: <input type="file" name="myfile"> <br> <input type="submit" value="upload"> </form> <?php // conecting to database mysql_connect("localhost","root","") or die("cant connect to server."); mysql_select_db("databaseimage") or die("cant connect to database"); // file properties /* here we are declaring a variable which uses a builtin function of $_FILES and the first part of it is the name of the image, which we have selected in input name ="image" section. and the second part is the temporary name and location where the file is being uploaded, usually its the temp folder of the server....you can check it by writing echo before the $file */ echo "name: "; echo $name = $_FILES['myfile']['name']; echo "<BR>"; echo "type "; echo $type = $_FILES['myfile']['type']; echo "<BR>"; echo "Size: "; echo $size = $_FILES['myfile']['size']; echo "<BR>"; echo "temp: "; echo $temp = $_FILES['myfile']['tmp_name']; echo "<BR>"; echo "error code: "; echo $error = $_FILES['myfile']['error']; echo "<BR>"; echo "<BR>"; echo "file contents: "; // this will be used to save in database as BLOB (Binary Large Object) data type. echo $file_contents = addslashes(file_get_contents($_FILES['myfile']['tmp_name'])); echo "<BR>"; // now inserting the data into database if (!$insert = mysql_query("INSERT INTO store VALUES ('','$name','$file_contents')")) echo "problem uploading file"; else { $last_id = mysql_insert_id(); echo "Image uploaded."; echo "<BR>"; echo "<img src=get.php?id=$last_id>"; } ?> </body> </html>
If the shell script is readable and executable then to execute it just type the name of the shell script file. Otherwise, you can explicity call a shell interpreter to run the file as a shell script, i.e., ksh myfile
A script is a file that contains a set of commands to be performed. Instead of you manually entering all of the commands into the console, the script is run and does it automatically.
what is the differences between a file and a folder
Do a search for the file name.