file management in C shell


 
Thread Tools Search this Thread
Top Forums Programming file management in C shell
# 1  
Old 01-27-2002
file management in C shell

Hi

I appreciate if someone can help me. I am new to C shell programming, and I would like to know how to write a code in C shell to find, copy, delete, rename file, also how to change file attibutes, compress a file.

Many thanks in advance.
# 2  
Old 01-28-2002
Do the command man cp. This will give you information on coping files. Then read the SEE ALSO portion - these are commands that also deal with the type of information you are looking for. If you don't know a command, this is one way to find others to learn about. A script is just like using a command manually. Just that you type it in once and can use it over and over.

Instead of
% ls -1

#!/bin/csh -f
set myfile=/tmp/lsfile.txt
ls -1 > $myfile
more $myfile

Or however you want to do things. You will be better off learning/ running either sh or ksh if you are a SysAdmin as the startup scripts on UNIX has to be done in sh (to a certain point). Since it is something to know, learn them first then take on csh (IMHO).
thehoghunter
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

File Management: Removing of files from Server2 IF the same file is removed from Server1.

Hi Folks, I have a requirement of file management on different servers. Source Server is SERVER-A. Two servers will fetch files from SERVER-A: SERVER1 and SERVER2. 4th SERVER is SERVER-B, It will fetch files from SERVER1. If SERVER1 goes DOWN, SERVER-B will fetch pending files from... (2 Replies)
Discussion started by: Raza Ali
2 Replies

2. What is on Your Mind?

Individual Risk Management (Personal IT Security) and Browser Cache Management

Original post from this thread on browser caching. To add to this, it is an effective security measure to clear absolutely all cached data (cookies, web content, ....) when closing the browser - i.e. in case of a shutdown. It takes a bit of work to re-login to all the sites but websites will not... (7 Replies)
Discussion started by: bakunin
7 Replies

3. UNIX for Dummies Questions & Answers

Hard disk and file management?

Dear experts, I have to write a small project named "Hard disk management and file management in Unix/Linux". I have absolutely NO idea about what Unix/Linux is, except that it is operational system. My question to you is: Whats is the difference between Unix and Linux and since the title of my... (3 Replies)
Discussion started by: makara
3 Replies

4. Shell Programming and Scripting

Shell Scripted Document Management System

Over the past 4 -5 years, I have cobbled together a rudimentary 'Document Management System' for a school district I support using Linux Bash Shell scripts.. The purpose of the scripting was to supplement features of a Job Applicant Center that had very simplistic methods of handle file... (1 Reply)
Discussion started by: rmuledeer
1 Replies

5. Programming

how to run socket programme and file management concurrently

hi i have a server socket programme which is running in HP/UX system and then need to add a function about refreshing memory every miniute because the socket programme is blocked , i have no idea about this what should i do thanks (10 Replies)
Discussion started by: benbenpig
10 Replies

6. UNIX for Dummies Questions & Answers

File management based on date created

Hi There, I was wondering how to manage files (ie. rm, cp , mv) based on date last modified and date created. ie. Say i want to: mv ./* ./temp/* (where the date created < 29/1/2006 ) or mv ./* ./temp/* (where the date modified > 27/1/2006 && date modified < 29/1/2006) Thanks in... (1 Reply)
Discussion started by: Geehog_Rare
1 Replies

7. UNIX for Dummies Questions & Answers

FILE MANAGEMENT in WINDOWS & UNIX

Hi, I am a new member here. I am in my final year of engineering in Computer & Information Systems. Wanted to know, how file management is done in both windows and unix. Kindly, tell me anyone who knows it in detail, or has any links regarding it. Thanks (1 Reply)
Discussion started by: farazcis
1 Replies

8. Windows & DOS: Issues & Discussions

file management in windows 2000 server

i am using windows 2000 server. my query is as follows: there are 2 directories say c:\emp & c:\exe. DataBase (DB) files are there in emp folder and the executables are in exe folder. Now i want to share the exe folder to the clients. If i give read permission to the exe folder and no... (3 Replies)
Discussion started by: raguramtgr
3 Replies

9. UNIX for Dummies Questions & Answers

file management in unix

hello In unix system, is there any file management like Window Explorer in Windows system. If it has, what is different between them. Could you please help because I do not have any idea about UNIX thank you john (5 Replies)
Discussion started by: johnhelen
5 Replies
Login or Register to Ask a Question