answersLogoWhite

0

cp myfile /dev/null

if it does not exist it will give you :

cp: cannot stat `myfile': No such file or directory

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is head command in UNIX?

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 move a file using which commands?

You need to use the MS-DOS commands to move a file.


What is configsys?

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.


A file that stores multiple DOS commands is called?

Batch File


What text file contains a series of commands that are executed in order?

Batch File


What is the mv command in Unix?

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


Explain any six file commands in C plus plus?

There's no commands in C++.


How store image path in database in php and how to retrive it?

<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>


What is the command to execute a shell script?

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


What is a script file in Linux?

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.


Difference between file and folder in dos commands?

what is the differences between a file and a folder


How do you verify that a file exists on your computer?

Do a search for the file name.