Script Commands for Linux Devices
Use the options and examples below to help you create your own powerful script commands.
Legend
| Format | Meaning | 
|---|---|
| text | Enter the command exactly as shown. | 
| text | Replace with the requested information. | 
| [text] | Information contained within square brackets is optional to the command. | 
| text|text | Choose one of the options separated by the vertical pipe. | 
Commands
| Command | Syntax | 
|---|---|
| catDisplays contents of the specified file. | cat filenameExample To see the contents of snickers.xml: 
 | 
| cdChanges the current directory. | cd [directory]Example To change to the Chocolate directory: 
 | 
| chmodModifies user access and permissions. | chmod [+|-|=] [u|g|o|r|w|x] filenameWhere 
 Example To give the current group the permission to modify nutmeg.txt: 
 To change file permission to read, write and execute  
 | 
| copyorcpCopies one or more files to another location. | copy source destinationExample To copy all files with the extension .txt from the C:\ to the temp directory on the device: C:\tempt\*.txt 1:\temp | 
| connectPrompts the device agent to attempt to connect to the deployment server. | ./mobicontrol -connect | 
| delDeletes a file or folder. | del filenameExample To delete a file named skittles.jpg: 
 To delete all files with the extension .jpg in the current directory: 
 To delete a file named skittles.jpg, forcefully: 
 To delete a folder named Wrigley: 
 | 
| disconnectPrompts the device agent to disconnect from the deployment server. | ./mobicontrol -disconnect | 
| findFinds a file on the device. | find [/S] [filename]Where  Example To search for all files with a .txt file extension including subfolders: 
 | 
| haltShuts down the device. | sudo halt | 
| installInstalls software from the repository. | sudo apt-get packageNameWhere packageName is the name of the application installer file on the device Example To install the Vim text editor: 
 | 
| manDisplays the manual for a command. | man commandExample To learn more about the  
 | 
| mkdirormdCreates a new directory. | mkdir [drive:] pathExample To create a directory named "test" from the current directory: 
 To create  
 | 
| moveMoves a file from specified source location to specified destination location. Note: You can rename the file at the same time by specifying a name for the destination filename. | move [sourceFilePath] filename destinationFilePath [filename]Example To move the file test.bat: 
 
 To move and rename a file at the same time: 
 To move folder to root folder: 
 | 
| rebootReboots the device. | sudo reboot | 
| renameRenames a file or folder. | rename sourceFilename destinationFilenameExample To rename the file  
 | 
| resetPerforms a soft or hard reset of the device. | reset [/S | /H | /W | /E] [/delaysec]Where 
 On Android Plus devices it is possible to specify a  If  Example To soft reset a device: 
 To reset an Android Plus device to its factory settings in 30 seconds: 
 | 
| rmDeletes a file or folder. | rm filenameExample To delete a file named skittles.jpg: 
 To delete all files with the extension .jpg in the current directory: 
 To delete a file named skittles.jpg, forcefully: 
 To delete a folder named Wrigley: 
 | 
| rmdirorrdDeletes a directory. | rmdir [/S] pathWhere  On Android Plus and Linux devices, this command requires the  Example To remove an empty directory named "test" from the current directory: 
 To remove a directory named "test" and all of its contents from the current directory: 
 To provide location: 
 | 
| setdateSets the date and time. | setdate date [time]Where  Example To set the date and time of the device 
 | 
| shellLaunches the Linux shell. | shell | 
| shutdownTurns off the device. | shutdown [delay]Where  Example To turn off the device: 
 To turn off the device in 25 seconds: 
 | 
| turnoffShuts down the device. You can specify a delay (in milliseconds) before shutdown. | turnoff [time]Example To turn off the device in 3.5 seconds: 
 | 
| uninstallRemoves the specified program from the device. | sudo dpkg -r programExample To remove the program Vim text editor: 
 | 
| writeprivateprofstringSaves or deletes specified settings on a device. See The writeprivateprofstring Command for more information. |