Sponsored Content
Top Forums Shell Programming and Scripting delete all folders/files and keep only the last 10 in a folder Post 302096730 by melanie_pfefer on Friday 17th of November 2006 02:04:13 PM
Old 11-17-2006
thanks

ls -ltr | awk '{print $9}' | tail -10 | head -1

will give the file. How to put it in the next command:
find . ! -newer <HERE> -exec rm {} \;

thx.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

delete all the files in folder a which exist in folder b

Hi , I need a script which basically deltes all files in folder a which are alreasy present in folder b say folder a has files abc.txt pqr .txt and b has abc.txt pqr.txt rmr.txt then file abc.txt and pqr.txt from a should be deleted (6 Replies)
Discussion started by: viv1
6 Replies

2. Shell Programming and Scripting

copy some files from users home folders to my folder

i have users home directories in /home all the users have some files starting with character e and i want to copy all these files in a folder in my (root) home using a script i tried the script for i in m5 do cd m5 cp e1* /home/pc/exam cd .. done but get these... (3 Replies)
Discussion started by: pcrana
3 Replies

3. Shell Programming and Scripting

Move all files but not folders to a new folder

Hi, I have a sub directory with a number of files and folders. What i want is a subdirectory with just folders and not files for cleanliness sake. So I want to move the files into the new folder but keep the folders in the same place. Move all files (but not folders) to new folder. I am... (4 Replies)
Discussion started by: Hopper_no1
4 Replies

4. Shell Programming and Scripting

moving files from one folder to many folders

I have a more than 10 K files in a folder. They are accumulated in a period of more than an year (Say from 13th July 2010 to 4th June 2011). I need to perform housekeeping on this. The requirement is to create a folder like 13Jul2010,14July2010,......3June2011,4June2010 and then from the main... (2 Replies)
Discussion started by: realspirituals
2 Replies

5. Shell Programming and Scripting

Symlink all files from one folder into all found folders

Hi. I have a folder which contains my application. I then have a flexible number of folders in another directory, called “sites”. It looks like this: -Application -- Test.html -- CSS --- Style.css -Sites --Site1 --Site2 I want to symlink all the files in the application folder... (1 Reply)
Discussion started by: Spadez
1 Replies

6. Shell Programming and Scripting

How to delete other's folders which are in our own folder?

Hi All, I need a solution for the following scenario. I am the owner for the particular folder and I have given 777 permissions for some specific reasons. So others can able to create folders and files. But when I am done with the work, I need to delete the folders which are created by... (4 Replies)
Discussion started by: manoj_thorali
4 Replies

7. UNIX for Dummies Questions & Answers

Unzipping a file which has multiple folders and each folder has the files with same name in it

Hi, I have a zipped file a.zip. This has got multiple folders in it say x and y. x contains a.txt and y contains a.txt. Is it possible to unzip this file and have the 2 files extracted and rename them to unique names. Thanks in advance. (1 Reply)
Discussion started by: arunkesi
1 Replies

8. Shell Programming and Scripting

Split a folder with huge number of files in n folders

We have a folder XYZ with large number of files (>350,000). how can i split the folder and create say 10 of them XYZ1 to XYZ10 with 35,000 files each. (doesnt matter which files go where). (12 Replies)
Discussion started by: AlokKumbhare
12 Replies

9. Shell Programming and Scripting

Moving files and folders to another folder

I recently bought Synology server and realised it can run scripts. I would need fairly simple script which moves all files and folders from ARCHIVE folder to WORKING folder. I would also need to maintain folder structure as each of the folders may contain subfolders. How would I go about it as I am... (1 Reply)
Discussion started by: ###
1 Replies

10. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
STRUCT 
CFG80211_BEAC(9) Actions and configuration STRUCT CFG80211_BEAC(9) NAME
struct_cfg80211_beacon_data - beacon data SYNOPSIS
struct cfg80211_beacon_data { const u8 * head; const u8 * tail; const u8 * beacon_ies; const u8 * proberesp_ies; const u8 * assocresp_ies; const u8 * probe_resp; size_t head_len; size_t tail_len; size_t beacon_ies_len; size_t proberesp_ies_len; size_t assocresp_ies_len; size_t probe_resp_len; }; MEMBERS
head head portion of beacon (before TIM IE) or NULL if not changed tail tail portion of beacon (after TIM IE) or NULL if not changed beacon_ies extra information element(s) to add into Beacon frames or NULL proberesp_ies extra information element(s) to add into Probe Response frames or NULL assocresp_ies extra information element(s) to add into (Re)Association Response frames or NULL probe_resp probe response template (AP mode only) head_len length of head tail_len length of tail beacon_ies_len length of beacon_ies in octets proberesp_ies_len length of proberesp_ies in octets assocresp_ies_len length of assocresp_ies in octets probe_resp_len length of probe response template (probe_resp) AUTHOR
Johannes Berg <johannes@sipsolutions.net> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT CFG80211_BEAC(9)
All times are GMT -4. The time now is 07:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy